Bug 67324 - cairo_type1_subset.c: write_used_glyphs should check _cairo_winansi_to_glyphname return value
Summary: cairo_type1_subset.c: write_used_glyphs should check _cairo_winansi_to_glyphn...
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.14
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-25 20:09 UTC by Salvador Ortiz
Modified: 2013-07-28 00:13 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
A simple patch that fixed the issue. (814 bytes, text/plain)
2013-07-25 20:09 UTC, Salvador Ortiz
Details

Description Salvador Ortiz 2013-07-25 20:09:53 UTC
Created attachment 83008 [details]
A simple patch that fixed the issue.

After segmentation faults in inkscape and rsvg_convert, the backtrace points to strlen called from write_used_glyphs in cairo.

Please see https://bugzilla.redhat.com/show_bug.cgi?id=957009 for the bug reported to Fedora.

In some cases _cairo_winansi_to_glyphname can return null, so write_used_glyphs should check that.

Attached a naive patch that fixed the problem.

Regards.
Comment 1 Adrian Johnson 2013-07-28 00:13:33 UTC
> In some cases _cairo_winansi_to_glyphname can return null, so
> write_used_glyphs should check that.
> 
> Attached a naive patch that fixed the problem.

After figuring out why _cairo_winansi_to_glyphname was returning NULL it turns out your naive patch is the correct fix. I've pushed out a reformatted and commented version of the patch.

http://cgit.freedesktop.org/cairo/commit/?id=274863be08f6c8df6d411df9db725d34f7fbabea


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.