diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-11-14 18:36:26 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-11-16 09:58:54 +0100 |
| commit | ca13dd2ab5a486a0ab0bf5825bae9a087d854412 (patch) | |
| tree | bb2d71be13da30c9226fa21e85d0a117b9b5fe21 /executor/common_bsd.h | |
| parent | 2ac1d00f55d2dd477e6a004c2e03f6947e867d6b (diff) | |
pkg/csoruce: test that executor does not mis-spell any of the SYZ_* macros
Diffstat (limited to 'executor/common_bsd.h')
| -rw-r--r-- | executor/common_bsd.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/executor/common_bsd.h b/executor/common_bsd.h index 80e3fbf3e..7cc55820d 100644 --- a/executor/common_bsd.h +++ b/executor/common_bsd.h @@ -45,10 +45,6 @@ static uintptr_t syz_open_pts(void) static int tunfd = -1; -// We just need this to be large enough to hold headers that we parse (ethernet/ip/tcp). -// Rest of the packet (if any) will be silently truncated which is fine. -#define SYZ_TUN_MAX_PACKET_SIZE 1000 - #if GOOS_netbsd // Increased number of tap and tun devices if image script is used #define MAX_TUN 64 @@ -266,7 +262,9 @@ static long syz_extract_tcp_res(volatile long a0, volatile long a1, volatile lon if (tunfd < 0) return (uintptr_t)-1; - char data[SYZ_TUN_MAX_PACKET_SIZE]; + // We just need this to be large enough to hold headers that we parse (ethernet/ip/tcp). + // Rest of the packet (if any) will be silently truncated which is fine. + char data[1000]; int rv = read_tun(&data[0], sizeof(data)); if (rv == -1) return (uintptr_t)-1; |
