this report has been filed here: https://bugs.edge.launchpad.net/ubuntu/+source/poppler/+bug/406594 "1. Open "Failing pdf example" (attached) using evince. First page appears with 'next'. 2a. Press 'next' - "LOADING" appears, but nothing else. repeating 'next' -> same result. OR 2b. Press 'next' - "LOADING" appears, but nothing else. press 'previous' -> first page appears OK OR 2c. Use pull down magnification adjustment can result in hanging also. But using Control+ or Control- seem OK (though the result looks rather ragged!) None of 2a,b, or c were expected behaviours. Other pdfs open OK Same example doc opens ok in Adobe Reader 9 version 9.1.2 for linux" poppler version is 0.11.0 pdf: http://launchpadlibrarian.net/29677937/US20080229402.pdf
The pdf has a stream we fail to decode properly and enter almost an infinite loop.
Created attachment 29194 [details] [review] Correctly set the value of symCodeLen JBIG2Stream had an off-by-one error. It was computing symCodeLen incorrectly. (1+floor vs ceil). This patch should fix it. Did I mention this mistake was hard to find? I had the spec in one hand, JBIG2Stream.cc in the other...
Actually, should symCodeLen = 0 if they sum to 1? The spec doesn't say anything about it, but I suspect decoder->readBits(0) is going to be confused. Are they supposed to add up to always add to more? poppler should probably cleanly reject the file in that case. Someone who actually knows how JBIG2 works?
Well, you patch fixes 3 files and regresses none here so i'll take it as good for the moment. I've commited it so i'm closing the bug
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.