GNOME Bugzilla – Bug 646213
Hangul Jamo render as U+00xx boxes and produce valgrind errors
Last modified: 2011-04-08 00:55:29 UTC
Created attachment 184677 [details] test data to reproduce the bug Downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=671131 valgrind produces the following error with pango-view test-ko.txt (attached), when no font with Hangul Jamo area is installed: ==1891== Conditional jump or move depends on uninitialised value(s) ==1891== at 0x54C975C: _pango_cairo_font_private_get_glyph_extents (pangocairo-font.c:694) ==1891== by 0xCE6DB8A: set_glyph.clone.0 (hangul-fc.c:63) ==1891== by 0xCE6DEF5: render_syllable (hangul-fc.c:348) ==1891== by 0xCE6E5D7: hangul_engine_shape (hangul-fc.c:459) Actually, render_syllable (hangul-fc.c:348) accesses non-initialized memory area. I'm attaching a patch.
Created attachment 184678 [details] [review] patch to fix valgrind errors
I think we just need: - PANGO_GET_UNKNOWN_GLYPH (text[i])); + PANGO_GET_UNKNOWN_GLYPH (wc)); Fixed in master.
(In reply to comment #2) > I think we just need: > > - PANGO_GET_UNKNOWN_GLYPH (text[i])); > + PANGO_GET_UNKNOWN_GLYPH (wc)); > > > Fixed in master. I think this is wrong, since on the previous lines wc is mapped to a code point in "Hangul Compatibility Jamo" area from the original one in "Hangul Jamo" area. With the previous pango-view example, I see "3131" instead of original "1100". This is unwanted behavior for some applications like gucharmap.
Ah right. I misunderstood your patch. Fixed it. Please test.Bug 646213 - Hangul Jamo render as U+00xx boxes and produce valgrind errors
Thanks, now it renders "1100" for U+1100 as expected.