From 7a45d5722c7e75bfd9c53b0a2ba1e42a2fcc9626 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 11 Sep 2018 16:39:59 +0000 Subject: Fix a regression in CJBig2_Context::HuffmanAssignCode(). An assignment statement accidentally got removed in https://pdfium-review.googlesource.com/c/pdfium/+/31538. BUG=chromium:880920 Change-Id: Iaff20bd2484cd8bf6dc6a13cbf444cefbd605b25 Reviewed-on: https://pdfium-review.googlesource.com/42250 Reviewed-by: Henrique Nakashima Commit-Queue: Lei Zhang --- core/fxcodec/jbig2/JBig2_Context.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'core') diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp index d019cc148e..4656bfa084 100644 --- a/core/fxcodec/jbig2/JBig2_Context.cpp +++ b/core/fxcodec/jbig2/JBig2_Context.cpp @@ -1262,6 +1262,7 @@ bool CJBig2_Context::HuffmanAssignCode(JBig2HuffmanCode* SBSYMCODES, std::vector FIRSTCODE(LENMAX + 1); for (uint32_t i = 0; i < NTEMP; ++i) ++LENCOUNT[SBSYMCODES[i].codelen]; + LENCOUNT[0] = 0; for (int i = 1; i <= LENMAX; ++i) { pdfium::base::CheckedNumeric shifted = FIRSTCODE[i - 1]; -- cgit v1.2.3