Skip to content

JBIG2Stream: Fix byte counting

The JBIG2Stream::readSegments method contains a check for whether the number of bytes read actually matches the official size of the segment. This check would fail occasionally, because apparently the bytes read were (sometimes) counted wrongly.

Fix this by importing the corresponding explicit byte counting code from xpdf-4.02.

BUGS: #1005 (closed)

Merge request reports