[maemo-commits] [maemo-commits] r18266 - projects/haf/trunk/dbus-glib/debian/patches
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed May 6 16:29:32 EEST 2009
- Previous message: [maemo-commits] r18265 - projects/haf/tags/hildon-welcome
- Next message: [maemo-commits] r18267 - projects/haf/trunk/dbus-glib/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: makarhun Date: 2009-05-06 16:29:28 +0300 (Wed, 06 May 2009) New Revision: 18266 Added: projects/haf/trunk/dbus-glib/debian/patches/65-upstream-20884.patch Modified: projects/haf/trunk/dbus-glib/debian/patches/series Log: 65 Added: projects/haf/trunk/dbus-glib/debian/patches/65-upstream-20884.patch =================================================================== --- projects/haf/trunk/dbus-glib/debian/patches/65-upstream-20884.patch 2009-05-06 12:49:24 UTC (rev 18265) +++ projects/haf/trunk/dbus-glib/debian/patches/65-upstream-20884.patch 2009-05-06 13:29:28 UTC (rev 18266) @@ -0,0 +1,45 @@ +commit f36381131b6f410333a9a823a4fc131ac799394f +Author: Simon McVittie <simon.mcvittie at collabora.co.uk> +Date: 2009-03-26 18:00:16 +0000 + + fd.o#20884: dbus_g_proxy_manager_replace_name_owner: don't leave freed memory in the hash table if the name was the owner's first + + Here's a situation where this code would fail: + + * an owner :1.42 owns a name com.Example and a name org.Example + * the owner_names hash table contains { :1.42 => c }, where + c is a GSList link with data = "com.Example", next = o and + o is a GSList link with data = "org.Example", next = NULL + * the name owner for com.Example changes so :1.42 no longer owns the + name + * initially, names == c + * g_slist_delete_link unlinks and frees c, and sets names = o + * but c is still in the hash table, so next time we look in the hash + table, we crash + + The fix is to replace c with o in the owner_names hash table. + +diff --git a/dbus/dbus-gproxy.c b/dbus/dbus-gproxy.c +index b379c20..572b7fb 100644 +--- a/dbus/dbus-gproxy.c ++++ b/dbus/dbus-gproxy.c +@@ -753,9 +753,16 @@ dbus_g_proxy_manager_replace_name_owner (DBusGProxyManager *manager, + + names = g_slist_delete_link (names, link); + +- if (names == NULL) +- g_hash_table_remove (manager->owner_names, prev_owner); +- } ++ if (names == NULL) ++ { ++ g_hash_table_remove (manager->owner_names, prev_owner); ++ } ++ else ++ { ++ g_hash_table_insert (manager->owner_names, ++ g_strdup (prev_owner), names); ++ } ++ } + } + + if (new_owner[0] == '\0') Modified: projects/haf/trunk/dbus-glib/debian/patches/series =================================================================== --- projects/haf/trunk/dbus-glib/debian/patches/series 2009-05-06 12:49:24 UTC (rev 18265) +++ projects/haf/trunk/dbus-glib/debian/patches/series 2009-05-06 13:29:28 UTC (rev 18266) @@ -4,3 +4,4 @@ 20-owner_names-assert.patch 99-dbus-error.patch 60-NameOwnerChanged-arg0-matching.patch +65-upstream-20884.patch
- Previous message: [maemo-commits] r18265 - projects/haf/tags/hildon-welcome
- Next message: [maemo-commits] r18267 - projects/haf/trunk/dbus-glib/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]