[cairo-bugs] [Bug 5177] New: segfault in _cairo_atsui_font_text_to_glyphs

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Nov 26 15:56:34 PST 2005

Please do not reply to this email: if you want to comment on the bug, go to    
the URL shown below and enter yourcomments there.     
           Summary: segfault in _cairo_atsui_font_text_to_glyphs
           Product: cairo
           Version: 1.1.1
          Platform: Macintosh
        OS/Version: Mac OS X 10.3
            Status: NEW
          Severity: major
          Priority: P2
         Component: atsui font backend
        AssignedTo: cworth at cworth.org
        ReportedBy: jeff at infidigm.net
         QAContact: cairo-bugs at cairographics.org

_cairo_atsui_font_text_to_glyphs segfaults when called with a string of length 0 (i.e.             
cairo_text_extents (cr, "", &extents);). 

The segfault is reproducable on Mac OS X 10.4 with gtk_slide as well as with the following program that 
basically does the same thing cairo does.

/* build with: gcc -framework Carbon crash.c */
#include <Carbon/Carbon.h>

int main()
	short utf16 = 0;
	ItemCount glyphCount;
	ATSLayoutRecord *layoutRecords;
	ATSUTextLayout textLayout;


	ATSUSetTextPointerLocation(textLayout, &utf16, kATSUFromTextBeginning, kATSUToTextEnd, 0);
	ATSUDirectGetLayoutDataArrayPtrFromTextLayout(textLayout, 0, 
kATSUDirectDataLayoutRecordATSLayoutRecordCurrent, (void *)&layoutRecords, &glyphCount);
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the cairo-bugs mailing list