Bug 45605 - poppler aborts when rendering a huge radial shading
Summary: poppler aborts when rendering a huge radial shading
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 22:48 UTC by Adrian Johnson
Modified: 2012-02-05 06:46 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
pdf with huge radial shading (1.29 KB, application/pdf)
2012-02-03 22:48 UTC, Adrian Johnson
Details
patch to fix (811 bytes, patch)
2012-02-03 22:50 UTC, Adrian Johnson
Details | Splinter Review

Description Adrian Johnson 2012-02-03 22:48:07 UTC
Created attachment 56590 [details]
pdf with huge radial shading

When rendering the attached file poppler aborts with the message:

Error (0): Call to Object where the object was type 11, not the expected type 1 or 2
Aborted
Comment 1 Adrian Johnson 2012-02-03 22:50:44 UTC
Created attachment 56591 [details] [review]
patch to fix

The problem is caused by integer overflow in Lexer.cc This can be fixed by returning a real object instead of failing on integer overflow. Patch attached.
Comment 2 Albert Astals Cid 2012-02-04 07:46:14 UTC
The patch looks acceptable but i'd like if you first tried changing that code taht does the getNum to first check for isNum() and see if that is "enough" to get an acceptable output, if that works i'd prefer that to changing the Lexing since everytime we change it to fix something some other thing breaks
Comment 3 Adrian Johnson 2012-02-04 14:15:04 UTC
The number that is being read is r1A in GfxRadialShading. I tried testing the value with isNum() and if it fails, set r1A to 0 but the shading fails to render (blank page). The huge radius is not an bug but just a valid radius that happens to be larger than an unsigned integer.
Comment 4 Albert Astals Cid 2012-02-05 06:34:47 UTC
Please commit the patch to both branches.
Comment 5 Adrian Johnson 2012-02-05 06:46:26 UTC
Pushed.


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.