From fa3166c227f0095204521672b8ce4770dafd0035 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Fri, 12 Apr 2019 12:03:04 +0200 Subject: Disable hash randomization when fuzzing Use the FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION macro proposed by libFuzzer. --- dict.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dict.c') diff --git a/dict.c b/dict.c index 0ef3718d..14fe398e 100644 --- a/dict.c +++ b/dict.c @@ -38,7 +38,8 @@ * list we will use the BigKey algo as soon as the hash size grows * over MIN_DICT_SIZE so this actually works */ -#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME) +#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME) && \ + !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) #define DICT_RANDOMIZATION #endif -- cgit v1.2.1