summaryrefslogtreecommitdiff
path: root/testing/libfuzzer/xfa_codec_fuzzer.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-11-28 15:17:27 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-28 15:17:27 +0000
commitfee749f0a1419e300a49ef657106f580c43842c4 (patch)
tree8988e8dbd782553b307c90b23e41a111bf3b9e15 /testing/libfuzzer/xfa_codec_fuzzer.h
parente82af1a845c13f16972ab9ea10ae8caf00d54d5a (diff)
downloadpdfium-fee749f0a1419e300a49ef657106f580c43842c4.tar.xz
Fix PDF fuzzers memory limit
This CL reduces the memory limit in pdf_codec_jbig2_fuzzer. Note that MSAN requires the limit to be lower than the actual bot usage limit. In the testcase, we get OOM just after CFX_DIBitmap::Create. It also increases the limit in xfa_codec_fuzzer.h Bug: 784155 Change-Id: I6fc8d9533ca7dc2b19bf84b9eac23284e05b1e6d Reviewed-on: https://pdfium-review.googlesource.com/19571 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing/libfuzzer/xfa_codec_fuzzer.h')
-rw-r--r--testing/libfuzzer/xfa_codec_fuzzer.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/testing/libfuzzer/xfa_codec_fuzzer.h b/testing/libfuzzer/xfa_codec_fuzzer.h
index c7a16a8005..90706af9f4 100644
--- a/testing/libfuzzer/xfa_codec_fuzzer.h
+++ b/testing/libfuzzer/xfa_codec_fuzzer.h
@@ -17,9 +17,8 @@
#include "testing/fx_string_testhelpers.h"
#include "third_party/base/ptr_util.h"
-// Arbitrarily picked to support up to 1000x1000 images. This is far below where
-// OOM issues are occuring.
-const int kXFACodecFuzzerPixelLimit = 1000000;
+// Support up to 512 MB. This prevents trivial OOM when MSAN is on.
+const int kXFACodecFuzzerPixelLimit = 512000000;
class XFACodecFuzzer {
public: