Initialize unthemed_icon to NULL to avoid accessing uninitialized memory

* gtk/gtkicontheme.c (choose_icon): Initialize unthemed_icon to NULL
	to avoid accessing uninitialized memory when
	gtk_icon_theme_choose_icon() is called with an empty names list.

svn path=/trunk/; revision=18018
This commit is contained in:
Torsten Schönfeld 2007-06-03 20:44:10 +00:00
parent 9daa2554b5
commit 5b12bfdad2
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-06-03 Torsten Schoenfeld <kaffeetisch@gmx.de>
* gtk/gtkicontheme.c (choose_icon): Initialize unthemed_icon to NULL
to avoid accessing uninitialized memory when
gtk_icon_theme_choose_icon() is called with an empty names list.
2007-06-03 Richard Hult <richard@imendio.com> 2007-06-03 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: (create_crossing_event): Set the key * gdk/quartz/gdkevents-quartz.c: (create_crossing_event): Set the key

View File

@ -1234,7 +1234,7 @@ choose_icon (GtkIconTheme *icon_theme,
GtkIconThemePrivate *priv; GtkIconThemePrivate *priv;
GList *l; GList *l;
GtkIconInfo *icon_info = NULL; GtkIconInfo *icon_info = NULL;
UnthemedIcon *unthemed_icon; UnthemedIcon *unthemed_icon = NULL;
gboolean allow_svg; gboolean allow_svg;
gboolean use_builtin; gboolean use_builtin;
gint i; gint i;