Doesn't render correctly a JBIG2 based PDF

Bug #321561 reported by Pedro Villavicencio
4
Affects Status Importance Assigned to Milestone
Poppler
Fix Released
Medium
poppler (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Pages 0, 2 and 3 are not rendered correctly

Pdf found at http://launchpadlibrarian.net/21544672/01004PT1.pdf

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Pages 0, 2 and 3 are not rendered correctly

Pdf found at http://launchpadlibrarian.net/21544672/01004PT1.pdf

Changed in poppler:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Triaged
Changed in poppler:
status: Unknown → Confirmed
Revision history for this message
In , David Benjamin (davidben) wrote :

Created an attachment (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.

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

Commited, keep up the good work :-)

Changed in poppler:
status: Confirmed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

the bug has been fixed upstream now

Changed in poppler (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

the new version fixing this issue is in karmic now

Changed in poppler (Ubuntu):
status: Fix Committed → Fix Released
Changed in poppler:
importance: Unknown → Medium
Changed in poppler:
importance: Medium → Unknown
Changed in poppler:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.