GNOME Bugzilla – Bug 723582
invalid read/write at pango_glyph_item_get_logical_widths()
Last modified: 2014-07-14 16:51:49 UTC
Created attachment 268033 [details] test case to reproduce a crash opening the attached text on gedit causes a segfault and valgrind reports invalid read/write at pango_glyph_item_get_logical_widths(). I don't know what exactly is wrong but (PangoGlyphItemIter *)->end_char points to the value more than num_chars, then it crashes so that accessing out of the allocated memory at (ParaBreakState *)->log_widths at process_item() in pango-layout.c:3462. and that end_chars are assigned by pango_glyph_item_iter_next_cluster() in pango_glyph_item_iter_init_start() because iter->end_index is less than iter->start_index and then pango_utf8_strlen calculate its length till the NULL-terminator.
just realized that (PangoGlyphString *)->log_clusters[] contains the negative values. is this an expected thing? that looks like that introduces messing up iter->end_index in pango_glyph_item_iter_next_cluster().
That looks like harfbuzz issue. this happened with harfbuzz 0.9.24 but works fine with git.
To correct, building harfbuzz with graphite2 enabled seems introducing this crash. it works without graphite2, even on 0.9.24. FYI
*** Bug 724565 has been marked as a duplicate of this bug. ***
Lets followup here: https://bugs.freedesktop.org/show_bug.cgi?id=75076
*** Bug 726384 has been marked as a duplicate of this bug. ***