From 401e618415d424f8a8b48f15e6710fa0e75d0615 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Thu, 10 May 2018 16:47:16 +0000 Subject: Remove a completeness check from CJBig2_GRRDProc::DecodeTemplate0Opt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Commit-Queue: Nicolás Peña Moreno --- core/fxcodec/jbig2/JBig2_GrrdProc.cpp | 3 --- 1 file changed, 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_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) | -- cgit v1.2.3