Re: [patch] serious problem in pango_layout_set_text()
- From: Havoc Pennington <hp redhat com>
- To: Sven Neumann <sven gimp org>
- Cc: Owen Taylor <otaylor redhat com>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: [patch] serious problem in pango_layout_set_text()
- Date: 22 Aug 2001 17:30:05 -0400
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]