summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-09-11 16:39:59 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-09-11 16:39:59 +0000
commit7a45d5722c7e75bfd9c53b0a2ba1e42a2fcc9626 (patch)
treeef053548dc69364b0a027e1402f10cfe2fbdec58
parent9039169b64e117516cd274bfb85ca9d696d4ef5b (diff)
downloadpdfium-7a45d5722c7e75bfd9c53b0a2ba1e42a2fcc9626.tar.xz
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 <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
-rw-r--r--core/fxcodec/jbig2/JBig2_Context.cpp1
1 files changed, 1 insertions, 0 deletions
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<int> 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<int> shifted = FIRSTCODE[i - 1];