Bug 70671 - cairo_surface_create_similar_clip can create negative surfaces
Summary: cairo_surface_create_similar_clip can create negative surfaces
Status: RESOLVED DUPLICATE of bug 66229
Alias: None
Product: poppler
Classification: Unclassified
Component: cairo backend (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-20 14:08 UTC by Michaël Cadilhac
Modified: 2015-08-03 01:38 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
This PDF triggers a cairo error (1.10 KB, application/pdf)
2013-10-20 14:08 UTC, Michaël Cadilhac
Details

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.