GNOME Bugzilla – Bug 700577
Support invalid UTF-8 chars in pango_find_paragraph_boundary()
Last modified: 2013-05-28 06:01:12 UTC
When trying to fix bug #637270, I came across a problem in pango_find_paragraph_boundary() when the text contains invalid UTF-8 chars.
Created attachment 244618 [details] [review] Support invalid UTF-8 chars in pango_find_paragraph_boundary() At the end of the while loop, g_utf8_next_char() is called. If p points to an invalid UTF-8 char, the next char can be skipped. And if the next char is the end of the string, we have p > end. Tested with the string "foobar\xC0".
Fixed. Thanks.
Sébastien: what about also adding a unit test? :-)