fuzz: build compatibility with oss-fuzz flags

ie C define FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
pull/4780/head
Philippe Antoine 5 years ago
parent 5f71e7a371
commit 91b2930891

@ -6482,6 +6482,8 @@ static int HTPParserTest16(void)
goto end;
}
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
//these events are disabled during fuzzing as they are too noisy and consume much resource
FLOWLOCK_WRLOCK(f);
void *txtmp = AppLayerParserGetTx(IPPROTO_TCP, ALPROTO_HTTP,f->alstate, 0);
AppLayerDecoderEvents *decoder_events = AppLayerParserGetEventsByTx(IPPROTO_TCP, ALPROTO_HTTP, txtmp);
@ -6501,6 +6503,7 @@ static int HTPParserTest16(void)
printf("HTTP_DECODER_EVENT_URI_DELIM_NON_COMPLIANT not set: ");
goto end;
}
#endif
result = 1;
end:

@ -281,6 +281,7 @@ int RunmodeGetCurrent(void)
* construction, etc.
*/
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
static void SignalHandlerSigint(/*@unused@*/ int sig)
{
sigint_count = 1;
@ -289,6 +290,8 @@ static void SignalHandlerSigterm(/*@unused@*/ int sig)
{
sigterm_count = 1;
}
#endif
#ifndef OS_WIN32
/**
* SIGUSR2 handler. Just set sigusr2_count. The main loop will act on

Loading…
Cancel
Save