From 8de6c965adcd3a992a93ea09951f09421cd0b5fc Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 28 Mar 2011 17:24:18 +0100 Subject: [PATCH 14/25] marshal_collection_ptrarray: assert that the signature is valid This means that dbus_message_iter_open_container can't fail except by OOM, so use the shared handler. --- dbus/dbus-gvalue.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dbus/dbus-gvalue.c b/dbus/dbus-gvalue.c index 3203ed9..6493bc5 100644 --- a/dbus/dbus-gvalue.c +++ b/dbus/dbus-gvalue.c @@ -1908,12 +1908,14 @@ marshal_collection_ptrarray (DBusMessageIter *iter, g_warning ("Cannot marshal type \"%s\" in collection\n", g_type_name (elt_gtype)); return FALSE; } + g_assert (g_variant_is_signature (elt_sig)); if (!dbus_message_iter_open_container (iter, DBUS_TYPE_ARRAY, elt_sig, &subiter)) - goto oom; + oom (); + g_free (elt_sig); data.iter = &subiter; -- 1.7.4.1