Bug 70671

Summary: cairo_surface_create_similar_clip can create negative surfaces
Product: poppler Reporter: Michaël Cadilhac <michael>
Component: cairo backendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: medium    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: This PDF triggers a cairo error

Description Michaël Cadilhac 2013-10-20 14:08:11 UTC
Created attachment 87877 [details]
This PDF triggers a cairo error

The attached PDF is a single page containing an XObject which prints a Knockout transparency group, which itself prints a non-Knockout transparency group.  It is not properly drawn using evince because of a cairo error.

In greater details:

With this PDF, in cairo_surface_create_similar_clip, the surface resulting from:

  result = cairo_surface_create_similar (target, content, width, height);

is defined with a negative height.  This in turn leads to the following Cairo error when drawing the group:

  BAD status: invalid value (typically too big) for the size of the input (surface, pattern, etc.)

I'm not sure what the comment:

  //XXX: negative matrix

in the body of the function is refering to, but indeed, there's a sign problem.


Adding abs(...) around the two substractions (CairoOutputDev.cc:1425 and next) does the trick --- the PDF is rendered correctly ---, but I'm not sure this is the right fix.

(Using git poppler)
Comment 1 Jason Crain 2015-08-03 01:38:56 UTC

*** This bug has been marked as a duplicate of bug 66229 ***

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.