Summary: | Problem decoding JBIG2Stream stream | ||
---|---|---|---|
Product: | poppler | Reporter: | Pedro Villavicencio <pvillavi> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | davidben |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
URL: | https://bugs.edge.launchpad.net/ubuntu/+source/poppler/+bug/406594 | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Correctly set the value of symCodeLen |
Description
Pedro Villavicencio
2009-07-29 13:38:10 UTC
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.