summaryrefslogtreecommitdiff
path: root/testing/libfuzzer/xfa_codec_fuzzer.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-13 13:46:49 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-13 13:46:49 -0700
commit82e24b1c5047076b982c073671315071760b9880 (patch)
treee295661ad5381c3a8135d5421f9d0e4d265d9efd /testing/libfuzzer/xfa_codec_fuzzer.h
parent754646948a572745380bcbdc23433337ca3dc562 (diff)
downloadpdfium-82e24b1c5047076b982c073671315071760b9880.tar.xz
Optionally skip image type detection in progressive decoder.
The progressive decoder will attempt to verify that the provided image type matches the actual image content. We need to disable this check when running the fuzzer in order to target the fuzzing to specific decoders otherwise each fuzzer will end up fuzzing all of the decoders. BUG=chromium:587126 Review-Url: https://codereview.chromium.org/2061733002
Diffstat (limited to 'testing/libfuzzer/xfa_codec_fuzzer.h')
-rw-r--r--testing/libfuzzer/xfa_codec_fuzzer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/testing/libfuzzer/xfa_codec_fuzzer.h b/testing/libfuzzer/xfa_codec_fuzzer.h
index f3a3517a12..38c4e0ac33 100644
--- a/testing/libfuzzer/xfa_codec_fuzzer.h
+++ b/testing/libfuzzer/xfa_codec_fuzzer.h
@@ -19,7 +19,8 @@ class XFACodecFuzzer {
mgr->CreateProgressiveDecoder());
Reader source(data, size);
- FXCODEC_STATUS status = decoder->LoadImageInfo(&source, type, nullptr);
+ FXCODEC_STATUS status =
+ decoder->LoadImageInfo(&source, type, nullptr, true);
if (status != FXCODEC_STATUS_FRAME_READY)
return 0;