fix segfault upon NULL return from gdk_utf8_to_string_target().

Fri Apr  5 01:06:15 2002  Tim Janik  <timj@gtk.org>

        * gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
        upon NULL return from gdk_utf8_to_string_target().

        * gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
        return value comment to mention NULL returns upon EMFILE.
This commit is contained in:
Tim Janik 2002-04-04 23:10:58 +00:00 committed by Tim Janik
parent e61fd79f19
commit cca4abf498
8 changed files with 57 additions and 2 deletions

View File

@ -1,3 +1,11 @@
Fri Apr 5 01:06:15 2002 Tim Janik <timj@gtk.org>
* gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
upon NULL return from gdk_utf8_to_string_target().
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
return value comment to mention NULL returns upon EMFILE.
Thu Apr 4 22:35:42 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testgtk.c (menu_items): revert accidentally commited
@ -34,6 +42,7 @@ Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk>
static color.
Tue Apr 2 11:10:13 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_set_sort_func): set the
sort_func correctly, 77030

View File

@ -1,3 +1,11 @@
Fri Apr 5 01:06:15 2002 Tim Janik <timj@gtk.org>
* gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
upon NULL return from gdk_utf8_to_string_target().
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
return value comment to mention NULL returns upon EMFILE.
Thu Apr 4 22:35:42 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testgtk.c (menu_items): revert accidentally commited
@ -34,6 +42,7 @@ Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk>
static color.
Tue Apr 2 11:10:13 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_set_sort_func): set the
sort_func correctly, 77030

View File

@ -1,3 +1,11 @@
Fri Apr 5 01:06:15 2002 Tim Janik <timj@gtk.org>
* gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
upon NULL return from gdk_utf8_to_string_target().
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
return value comment to mention NULL returns upon EMFILE.
Thu Apr 4 22:35:42 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testgtk.c (menu_items): revert accidentally commited
@ -34,6 +42,7 @@ Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk>
static color.
Tue Apr 2 11:10:13 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_set_sort_func): set the
sort_func correctly, 77030

View File

@ -1,3 +1,11 @@
Fri Apr 5 01:06:15 2002 Tim Janik <timj@gtk.org>
* gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
upon NULL return from gdk_utf8_to_string_target().
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
return value comment to mention NULL returns upon EMFILE.
Thu Apr 4 22:35:42 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testgtk.c (menu_items): revert accidentally commited
@ -34,6 +42,7 @@ Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk>
static color.
Tue Apr 2 11:10:13 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_set_sort_func): set the
sort_func correctly, 77030

View File

@ -1,3 +1,11 @@
Fri Apr 5 01:06:15 2002 Tim Janik <timj@gtk.org>
* gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
upon NULL return from gdk_utf8_to_string_target().
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
return value comment to mention NULL returns upon EMFILE.
Thu Apr 4 22:35:42 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testgtk.c (menu_items): revert accidentally commited
@ -34,6 +42,7 @@ Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk>
static color.
Tue Apr 2 11:10:13 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_set_sort_func): set the
sort_func correctly, 77030

View File

@ -1,3 +1,11 @@
Fri Apr 5 01:06:15 2002 Tim Janik <timj@gtk.org>
* gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
upon NULL return from gdk_utf8_to_string_target().
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
return value comment to mention NULL returns upon EMFILE.
Thu Apr 4 22:35:42 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testgtk.c (menu_items): revert accidentally commited
@ -34,6 +42,7 @@ Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk>
static color.
Tue Apr 2 11:10:13 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_set_sort_func): set the
sort_func correctly, 77030

View File

@ -591,7 +591,8 @@ sanitize_utf8 (const gchar *src)
*
* Return value: the newly-allocated string, or %NULL if the
* conversion failed. (It should not fail for
* any properly formed UTF-8 string.)
* any properly formed UTF-8 string unless system
* limits like memory or file descriptors are exceeded.)
**/
gchar *
gdk_utf8_to_string_target (const gchar *str)

View File

@ -1819,7 +1819,7 @@ set_text_property (GdkWindow *window,
{
prop_type = XA_STRING;
prop_text = gdk_utf8_to_string_target (utf8_str);
prop_length = strlen (prop_text);
prop_length = prop_text ? strlen (prop_text) : 0;
prop_format = 8;
}
else