Re: [patch] serious problem in pango_layout_set_text()



Sven Neumann <sven gimp org> writes: 
> I've expected you or Owen would say this. Why are you validating the
> string in pango_layout_set_text() then? If you decide not to add the
> return value indicating success, please at least return the PangoLayout 
> object in a sane state when bailing out with an error.
>

If it's easy to avoid a crash we can, but the function is never going
to be guaranteed not to crash on invalid UTF-8. Once we
g_return_if_fail() (or equivalent), then everything becomes undefined,
all bets are off. GTK has always been that way; these warnings
indicate a bug in the program.

Any app that tries to use invalid UTF-8 with GTK 2.0 is just going to
gruesomely implode.

Havoc





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]