From bab916d0843c1bebc9a2facf2f8668845a2e8e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Tue, 26 May 2020 17:17:26 +0200 Subject: [PATCH] sock_async_evnet: add comment to fuzzing termination condition --- sys/net/sock/async/event/sock_async_event.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/net/sock/async/event/sock_async_event.c b/sys/net/sock/async/event/sock_async_event.c index 813c28e10f..69ed79292c 100644 --- a/sys/net/sock/async/event/sock_async_event.c +++ b/sys/net/sock/async/event/sock_async_event.c @@ -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);