Commit 1695c8a
fuzz: in FuzzedSock::GetSockName(), return a random-length name
ConsumeData() will always try to return a name as long as the requested size. It is more useful, and
closer to how `getsockname` would actually behave in reality, to return a random length name
instead.
This was hindering coverage in the PCP fuzz target as the addr len was set to the size of the
sockaddr_in struct and would exhaust all the provided data from the fuzzer.
Thanks to Marco Fleon for suggesting this.
Co-Authored-by: marcofleon <[email protected]>1 parent 0d472c1 commit 1695c8a
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
362 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
363 | 365 | | |
364 | 366 | | |
365 | 367 | | |
| |||
0 commit comments