diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2019-08-23 14:50:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-23 14:50:37 +0200 |
| commit | 78ded1969a3882c1a5dc9cf32ed2ffc23119a4ca (patch) | |
| tree | 2eabe73f6a050f25c51f67a8b78b061ff54d5f8e /executor/common_usb.h | |
| parent | ca6f3cfa782bb9aa9e1cb1247a2a4632608ab368 (diff) | |
sys/linux, executor: minor USB fixes (#1361)
Diffstat (limited to 'executor/common_usb.h')
| -rw-r--r-- | executor/common_usb.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/executor/common_usb.h b/executor/common_usb.h index 033bae3e6..e342d8085 100644 --- a/executor/common_usb.h +++ b/executor/common_usb.h @@ -356,11 +356,14 @@ static volatile long syz_usb_connect(volatile long a0, volatile long a1, volatil else memset(&response.data[0], 0, response_length); - debug("syz_usb_connect: reply length = %d\n", response.inner.length); - if (event.ctrl.bRequestType & USB_DIR_IN) + if (event.ctrl.bRequestType & USB_DIR_IN) { + debug("syz_usb_connect: IN, length = %d\n", response.inner.length); rv = usb_fuzzer_ep0_write(fd, (struct usb_fuzzer_ep_io*)&response); - else + } else { rv = usb_fuzzer_ep0_read(fd, (struct usb_fuzzer_ep_io*)&response); + debug("syz_usb_connect: OUT, length = %d\n", response.inner.length); + debug_dump_data(&event.data[0], response.inner.length); + } if (rv < 0) { debug("syz_usb_connect: usb_fuzzer_ep0_read/write failed with %d\n", rv); return rv; |
