From 0fffe240936d38e32dcbbb0eae08f2b5a7653b49 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 28 Mar 2011 17:23:08 +0100 Subject: [PATCH 11/25] marshal_map: on error, abandon the container instead of closing it libdbus considers it to be a programming error if you close a container gracefully when its contents are incomplete. --- dbus/dbus-gvalue.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dbus/dbus-gvalue.c b/dbus/dbus-gvalue.c index 7293981..2335a14 100644 --- a/dbus/dbus-gvalue.c +++ b/dbus/dbus-gvalue.c @@ -1723,8 +1723,15 @@ marshal_map (DBusMessageIter *iter, marshal_map_entry, &hashdata); - if (!dbus_message_iter_close_container (iter, &arr_iter)) - goto lose; + if (hashdata.err) + { + dbus_message_iter_abandon_container (iter, &arr_iter); + goto lose; + } + else if (!dbus_message_iter_close_container (iter, &arr_iter)) + { + goto lose; + } out: g_free (entry_sig); -- 1.7.4.1