Commit d1223ff2 authored by LE GARREC Vincent's avatar LE GARREC Vincent Committed by Albert Astals Cid

ofz-8552: Overflow JBIG2Stream::readTextRegion

And fix endless loop.
parent 1a950e45
...@@ -2596,7 +2596,10 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(bool huff, bool refine, ...@@ -2596,7 +2596,10 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(bool huff, bool refine,
break; break;
} }
} }
s += sOffset + ds; if (checkedAdd(s, sOffset + ds, &s)) {
delete bitmap;
return nullptr;
}
} }
} }
......
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