|
|
@@ -55,7 +55,9 @@ static void *executeEventLoop(void *pthread_arg);
|
|
|
/** @brief Fuzz TCP packets handling flow with AFL.
|
|
|
*
|
|
|
*/
|
|
|
+#ifdef FUZZING_AFL
|
|
|
static void fuzzHandlePacketFlow(void);
|
|
|
+#endif /* FUZZING_AFL */
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
/** @brief Flag indicating if the stack should end its execution
|
|
|
@@ -265,8 +267,8 @@ static void *executeEventLoop(void *pthread_arg) {
|
|
|
return &pthread_dummy_ret;
|
|
|
}
|
|
|
|
|
|
-static void fuzzHandlePacketFlow(void) {
|
|
|
#ifdef FUZZING_AFL
|
|
|
+static void fuzzHandlePacketFlow(void) {
|
|
|
int socket_fd = 0; // Fake socket fd
|
|
|
uint8_t buff[512]; // Input buffer
|
|
|
struct sockaddr_in from_address = { 0 }; // Fake socket address
|
|
|
@@ -293,5 +295,5 @@ static void fuzzHandlePacketFlow(void) {
|
|
|
&from_address,
|
|
|
&outgoing_message);
|
|
|
}
|
|
|
-#endif
|
|
|
}
|
|
|
+#endif /* FUZZING_AFL */
|