[Poppler-bugs] [Bug 19706] Doesn't render correctly a JBIG2 based PDF

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jun 20 14:13:20 PDT 2009


http://bugs.freedesktop.org/show_bug.cgi?id=19706





--- Comment #1 from David Benjamin <dnas.dnas at gmail.com>  2009-06-20 14:13:20 PST ---
Created an attachment (id=26981)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=26981)
Fixes DecryptStream::getPos()

This patch appears to fix the bug.

The problem is that JBIG2Stream uses the Stream::getPos() of wrapped streams to
determine segment length, specifically whether too many or too few characters
have been read. A LOT of streams don't provide sane values and this trips up
JBIG2Stream. (Notably ones that subclass FilterStream. FilterStream provides a
default implementation of getPos() which is often wrong. It only works if the
Filter does not blow up or shrink the data, i.e. there is one and only one call
to str->readChar() for every call to readChar().)

The culprit in this case was DecryptStream.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list