aboutsummaryrefslogtreecommitdiffstats
path: root/fuzz/dct_fuzzer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'fuzz/dct_fuzzer.cc')
-rw-r--r--fuzz/dct_fuzzer.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/fuzz/dct_fuzzer.cc b/fuzz/dct_fuzzer.cc
index 450b4df2..b051819a 100644
--- a/fuzz/dct_fuzzer.cc
+++ b/fuzz/dct_fuzzer.cc
@@ -2,6 +2,7 @@
#include <qpdf/Pl_DCT.hh>
#include <iostream>
#include <stdexcept>
+#include <cstdlib>
class FuzzHelper
{
@@ -46,6 +47,11 @@ FuzzHelper::run()
extern "C" int LLVMFuzzerTestOneInput(unsigned char const* data, size_t size)
{
+#ifndef _WIN32
+ // Used by jpeg library to work around false positives in memory
+ // sanitizer.
+ setenv("JSIMD_FORCENONE", "1", 1);
+#endif
FuzzHelper f(data, size);
f.run();
return 0;