summaryrefslogtreecommitdiff
path: root/dict.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2019-04-12 12:03:04 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2019-04-12 12:06:34 +0200
commitfa3166c227f0095204521672b8ce4770dafd0035 (patch)
tree111fcc4698d2c3f63a352b9a56c40d58aab21e87 /dict.c
parent2d97a97aa515f1bd3efc35c8ea2aa68676c6f8e1 (diff)
downloadlibxml2-fa3166c227f0095204521672b8ce4770dafd0035.tar.gz
Disable hash randomization when fuzzing
Use the FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION macro proposed by libFuzzer.
Diffstat (limited to 'dict.c')
-rw-r--r--dict.c3
1 files changed, 2 insertions, 1 deletions
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