Commit 8b4a2891 authored by Albert Astals Cid's avatar Albert Astals Cid

Fix uninitialized memory use in JBIG2Stream::readTextRegionSeg

When the unlikely condition triggers
parent 409121ea
Pipeline #77283 passed with stages
in 8 minutes and 1 second
......@@ -2263,7 +2263,10 @@ void JBIG2Stream::readTextRegionSeg(unsigned int segNum, bool imm,
symCodeTab[i++].prefixLen = 0;
}
} else if (j > 0x100) {
if (unlikely(i == 0)) ++i;
if (unlikely(i == 0)) {
symCodeTab[i].prefixLen = 0;
++i;
}
for (j -= 0x100; j && i < numSyms; --j) {
symCodeTab[i].prefixLen = symCodeTab[i-1].prefixLen;
++i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment