diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2019-10-16 18:02:31 +0200 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@gmail.com> | 2019-10-21 15:56:03 +0200 |
| commit | 6901a56e001db2bd9705f69cc3f5649134b145ea (patch) | |
| tree | ef6006c8f14109ae8da2aa5863731cf0011016a5 /executor/common_linux.h | |
| parent | b24d2b8a213c09b511478e7eab5fa343e4a198de (diff) | |
executor/usb: enable endpoints on SET_INTERFACE
This commit changes syz_usb_control_io to enable the relevant endpoints
for the interface being set via a SET_INTERFACE request.
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index de9db05ff..5888b65cf 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -799,6 +799,10 @@ static long syz_extract_tcp_res(volatile long a0, volatile long a1, volatile lon } #endif +#if SYZ_EXECUTOR || SYZ_ENABLE_CLOSE_FDS || __NR_syz_usb_connect +#define MAX_FDS 30 +#endif + #if SYZ_EXECUTOR || __NR_syz_usb_connect #include <errno.h> #include <fcntl.h> @@ -2630,7 +2634,7 @@ static void close_fds() // Also close all USB emulation descriptors to trigger exit from USB // event loop to collect coverage. int fd; - for (fd = 3; fd < 30; fd++) + for (fd = 3; fd < MAX_FDS; fd++) close(fd); } #endif |
