diff options
author | Lei Zhang <thestig@google.com> | 2014-12-15 22:31:58 -0800 |
---|---|---|
committer | Lei Zhang <thestig@google.com> | 2014-12-15 22:31:58 -0800 |
commit | 50f444fc5081dbaa1250a89582263cb44459bf4e (patch) | |
tree | 10f5f39eb48815c19cbcae58a33a9b60e2448468 | |
parent | 7c23ebcf9b5d32a1ffeba14cff5f1e2291b83a47 (diff) | |
download | pdfium-50f444fc5081dbaa1250a89582263cb44459bf4e.tar.xz |
Do not do strict check of BitsPerComponent for RunLengthDecode filter
BUG=438421
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/790363002
(cherry picked from commit 869517236c27b92b7060da7f44a0b01e252e8211)
Review URL: https://codereview.chromium.org/806133002
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index c5a96d67f4..f053e559b3 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp @@ -946,8 +946,9 @@ void CPDF_DIBSource::ValidateDictParam() m_bpc = 1; m_nComponents = 1; } - if (pArray->GetString(pArray->GetCount() - 1) == FX_BSTRC("RunLengthDecode") || - pArray->GetString(pArray->GetCount() - 1) == FX_BSTRC("DCTDecode")) { + if (pArray->GetString(pArray->GetCount() - 1) == FX_BSTRC("DCTDecode")) { + // Previously, pArray->GetString(pArray->GetCount() - 1) == FX_BSTRC("RunLengthDecode") was checked in the "if" statement as well, + // but too many documents don't conform to it. m_bpc = 8; } } |