mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc_sock: add comment to fuzzing termination condition
This commit is contained in:
parent
e24774b739
commit
f37c1fd9dd
@ -93,6 +93,13 @@ ssize_t gnrc_sock_recv(gnrc_sock_reg_t *reg, gnrc_pktsnip_t **pkt_out,
|
||||
gnrc_pktsnip_t *pkt, *netif;
|
||||
msg_t msg;
|
||||
|
||||
/* The fuzzing module is only enabled when building a fuzzing
|
||||
* application from the fuzzing/ subdirectory. When using gnrc_sock
|
||||
* the fuzzer assumes that gnrc_sock_recv is called in a loop. If it
|
||||
* is called again and the previous return value was the special
|
||||
* crafted fuzzing packet, the fuzzing application terminates.
|
||||
*
|
||||
* sock_async_event has its on fuzzing termination condition. */
|
||||
#if defined(MODULE_FUZZING) && !defined(MODULE_SOCK_ASYNC_EVENT)
|
||||
if (gnrc_sock_prevpkt && gnrc_sock_prevpkt == gnrc_pktbuf_fuzzptr) {
|
||||
exit(EXIT_SUCCESS);
|
||||
|
Loading…
Reference in New Issue
Block a user