1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sock_async_evnet: add comment to fuzzing termination condition

This commit is contained in:
Sören Tempel 2020-05-26 17:17:26 +02:00
parent a8b0491751
commit bab916d084

View File

@ -42,6 +42,11 @@ static inline void _cb(void *sock, sock_async_flags_t type, void *arg,
ctx->event.type |= type;
event_post(ctx->queue, &ctx->event.super);
/* The fuzzing module is only enabled when building a fuzzing
* application from the fuzzing/ subdirectory. The fuzzing setup
* assumes that gnrc_sock_recv is called by the event callback. If
* the value returned by gnrc_sock_recv was the fuzzing packet, the
* fuzzing application is terminated as input processing finished. */
#ifdef MODULE_FUZZING
if (gnrc_sock_prevpkt && gnrc_sock_prevpkt == gnrc_pktbuf_fuzzptr) {
exit(EXIT_SUCCESS);