diff options
author | dsinclair <dsinclair@chromium.org> | 2016-06-13 13:46:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-13 13:46:49 -0700 |
commit | 82e24b1c5047076b982c073671315071760b9880 (patch) | |
tree | e295661ad5381c3a8135d5421f9d0e4d265d9efd /xfa | |
parent | 754646948a572745380bcbdc23433337ca3dc562 (diff) | |
download | pdfium-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 'xfa')
-rw-r--r-- | xfa/fxbarcode/BC_BufferedImageLuminanceSource.cpp | 3 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_ffwidget.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/xfa/fxbarcode/BC_BufferedImageLuminanceSource.cpp b/xfa/fxbarcode/BC_BufferedImageLuminanceSource.cpp index 814f300b2d..f822349972 100644 --- a/xfa/fxbarcode/BC_BufferedImageLuminanceSource.cpp +++ b/xfa/fxbarcode/BC_BufferedImageLuminanceSource.cpp @@ -38,7 +38,8 @@ static CFX_DIBitmap* CreateDIBSource(IFX_FileRead* fileread) { std::unique_ptr<CCodec_ProgressiveDecoder> pImageCodec( pCodecMgr->CreateProgressiveDecoder()); FXCODEC_STATUS status = FXCODEC_STATUS_DECODE_FINISH; - status = pImageCodec->LoadImageInfo(fileread, FXCODEC_IMAGE_UNKNOWN, nullptr); + status = pImageCodec->LoadImageInfo(fileread, FXCODEC_IMAGE_UNKNOWN, nullptr, + false); if (status != FXCODEC_STATUS_FRAME_READY) return nullptr; diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index 8925cd35cf..fb9ab5f580 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -1069,7 +1069,7 @@ CFX_DIBitmap* XFA_LoadImageFromBuffer(IFX_FileRead* pImageFileRead, CFX_DIBitmap* pBitmap = NULL; CCodec_ProgressiveDecoder* pProgressiveDecoder = pCodecMgr->CreateProgressiveDecoder(); - pProgressiveDecoder->LoadImageInfo(pImageFileRead, type, &dibAttr); + pProgressiveDecoder->LoadImageInfo(pImageFileRead, type, &dibAttr, false); switch (dibAttr.m_wDPIUnit) { case FXCODEC_RESUNIT_CENTIMETER: dibAttr.m_nXDPI = (int32_t)(dibAttr.m_nXDPI * 2.54f); |