Bug 25756 - Failure to process stream due to 'Length' absence
Summary: Failure to process stream due to 'Length' absence
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-22 02:43 UTC by Ilya Gorenbein
Modified: 2009-12-27 06:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch (312 bytes, patch)
2009-12-22 02:44 UTC, Ilya Gorenbein
Details | Splinter Review
test file (310 bytes, application/pdf)
2009-12-22 02:56 UTC, Ilya Gorenbein
Details
Updated patch (513 bytes, patch)
2009-12-27 00:11 UTC, Ilya Gorenbein
Details | Splinter Review

Description Ilya Gorenbein 2009-12-22 02:43:43 UTC
Hello,

I use poppler-0.12.0. Recently, I've got the files without 'Length' attribute at stream dictionary. This caused poppler to fail in stream processing. File poppler/Parser.cc Line 182. Acrobat Reader process the file successfully.
On the other hand, poppler already have a code for processing such cases (a few lines bellow). I attached a patch that causes the code to continue processing, instead of failure.

Regards,
Ilya
Comment 1 Ilya Gorenbein 2009-12-22 02:44:16 UTC
Created attachment 32242 [details] [review]
Patch
Comment 2 Ilya Gorenbein 2009-12-22 02:56:08 UTC
Created attachment 32243 [details]
test file
Comment 3 Albert Astals Cid 2009-12-22 14:04:37 UTC
That's a bit invasive, i'll have to run my test regression suite to see if it regresses somewhere, but that'll have to wait a few days.
Comment 4 Albert Astals Cid 2009-12-24 10:53:24 UTC
On a second look this seems quite dangerous as there is no guarantee length will ever be assigned later on, maybe adding a length = 0; in place of the return NULL;?
Comment 5 Ilya Gorenbein 2009-12-26 10:03:49 UTC
You are definitely correct, I will update the patch.
Comment 6 Ilya Gorenbein 2009-12-27 00:11:03 UTC
Created attachment 32312 [details] [review]
Updated patch

The 'length' was initialized to 0.
Comment 7 Albert Astals Cid 2009-12-27 06:29:27 UTC
I've commited the patch to git master branch


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.