summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2018-05-10 16:47:16 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-10 16:47:16 +0000
commit401e618415d424f8a8b48f15e6710fa0e75d0615 (patch)
tree75c04042141559339f16818fcab549852f912bd8
parent95061379c9453b941783398826acff674d2bbfd7 (diff)
downloadpdfium-401e618415d424f8a8b48f15e6710fa0e75d0615.tar.xz
Remove a completeness check from CJBig2_GRRDProc::DecodeTemplate0Opt
https://pdfium-review.googlesource.com/c/pdfium/+/18333 introduced several checks to prevent timeouts in JBig2. One of these is breaking the PDF in the bug, so this CL removes that check. Bug: chromium:841200 Change-Id: Ia75c699b7fddc26f0353b0d64349898c4d1f744d Reviewed-on: https://pdfium-review.googlesource.com/32250 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
-rw-r--r--core/fxcodec/jbig2/JBig2_GrrdProc.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/core/fxcodec/jbig2/JBig2_GrrdProc.cpp b/core/fxcodec/jbig2/JBig2_GrrdProc.cpp
index 8e4d8c005b..06a7fb1c17 100644
--- a/core/fxcodec/jbig2/JBig2_GrrdProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_GrrdProc.cpp
@@ -207,9 +207,6 @@ std::unique_ptr<CJBig2_Image> CJBig2_GRRDProc::DecodeTemplate0Opt(
}
uint8_t cVal = 0;
for (int32_t k = 0; k < nBits; k++) {
- if (pArithDecoder->IsComplete())
- return nullptr;
-
int bVal = pArithDecoder->Decode(&grContext[CONTEXT]);
cVal |= bVal << (7 - k);
CONTEXT = ((CONTEXT & 0x0cdb) << 1) | (bVal << 9) |