summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-01-17 21:30:56 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-17 21:30:56 +0000
commit9d5909e2cb3796fc9224e1762eb85318f4a31b7a (patch)
treebf9153e7ce78b4fbfb93a5e63adf0d8afd71c468 /core/fxcodec/codec
parent2993b758326c4f7f91cc6d6840bb1efde7642623 (diff)
downloadpdfium-9d5909e2cb3796fc9224e1762eb85318f4a31b7a.tar.xz
Remove param checking from StartScanLine
By catching this early we are now actually returning the wrong value. The bad value should be passed into the jpeg library code, which will cause a fatal error and jump out to the common error handling code for this method. BUG=pdfium:986 Change-Id: Ib3d32939aa38aece887c014c3a477407ee178193 Reviewed-on: https://pdfium-review.googlesource.com/23119 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcodec/codec')
-rw-r--r--core/fxcodec/codec/fx_codec_jpeg.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp
index cf501a99d1..6e227ca20e 100644
--- a/core/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/fxcodec/codec/fx_codec_jpeg.cpp
@@ -475,9 +475,6 @@ int CCodec_JpegModule::ReadHeader(Context* pContext,
}
bool CCodec_JpegModule::StartScanline(Context* pContext, int down_scale) {
- if (down_scale < 0)
- return false;
-
auto* ctx = static_cast<CJpegContext*>(pContext);
ctx->m_Info.scale_denom = static_cast<unsigned int>(down_scale);
return !!jpeg_start_decompress(&ctx->m_Info);