Skip to content

Commit dda7fe0

Browse files
mfend-wvbwhacks
authored andcommitted
USB: ffs-test: fix length argument of out function call
commit eb9c583 upstream. The out functions should only handle actual available data instead of the complete buffer. Otherwise for example the ep0_consume function will report ghost events since it tries to decode the complete buffer - which may contain partly invalid data. Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
1 parent 10b305e commit dda7fe0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/usb/ffs-test.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ static void *start_thread_helper(void *arg)
324324

325325
ret = t->in(t, t->buf, t->buf_size);
326326
if (ret > 0) {
327-
ret = t->out(t, t->buf, t->buf_size);
327+
ret = t->out(t, t->buf, ret);
328328
name = out_name;
329329
op = "write";
330330
} else {

0 commit comments

Comments
 (0)