Bug 409101 – invalid read to gtkicontheme.c insert_theme(), might cause

2007-02-26  Chris Wilson  <chris@chris-wilson.co.uk>

	Bug 409101 – invalid read to gtkicontheme.c insert_theme(), might cause gnome-panel crash

	* gtk/gtkicontheme.c: (scan_directory):
		Reorder the replacement of the shared base_name key, so that we
		avoid dereferencing the string in the icon_theme->all_icon
		hash table after freeing it from the dir->icons hash table.


svn path=/branches/gtk-2-10/; revision=17352
This commit is contained in:
Chris Wilson
2007-02-26 14:05:31 +00:00
committed by Chris Wilson
parent 507e28c958
commit 7884da3b1a
2 changed files with 10 additions and 1 deletions

View File

@@ -1,3 +1,12 @@
2007-02-26 Chris Wilson <chris@chris-wilson.co.uk>
Bug 409101 invalid read to gtkicontheme.c insert_theme(), might cause gnome-panel crash
* gtk/gtkicontheme.c: (scan_directory):
Reorder the replacement of the shared base_name key, so that we
avoid dereferencing the string in the icon_theme->all_icon
hash table after freeing it from the dir->icons hash table.
2007-02-18 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:

View File

@@ -2207,8 +2207,8 @@ scan_directory (GtkIconThemePrivate *icon_theme,
base_name = strip_suffix (name);
hash_suffix = GPOINTER_TO_INT (g_hash_table_lookup (dir->icons, base_name));
g_hash_table_replace (dir->icons, base_name, GUINT_TO_POINTER (hash_suffix| suffix));
g_hash_table_insert (icon_theme->all_icons, base_name, NULL);
g_hash_table_replace (dir->icons, base_name, GUINT_TO_POINTER (hash_suffix| suffix));
}
g_dir_close (gdir);