From f384985d4d8aa1e45ea03b8a479fb967fd83d9c9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 28 Mar 2011 17:25:50 +0100 Subject: [PATCH 17/25] marshal_collection_array: assert validity of signature This means we can recognise OOM reliably; do so. --- dbus/dbus-gvalue.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dbus/dbus-gvalue.c b/dbus/dbus-gvalue.c index 94a2eed..ab5580b 100644 --- a/dbus/dbus-gvalue.c +++ b/dbus/dbus-gvalue.c @@ -1956,6 +1956,7 @@ marshal_collection_array (DBusMessageIter *iter, g_warning ("Cannot marshal type \"%s\" in collection\n", g_type_name (elt_gtype)); return FALSE; } + g_assert (g_variant_is_signature (subsignature_str)); elt_size = _dbus_g_type_fixed_get_size (elt_gtype); @@ -1963,7 +1964,7 @@ marshal_collection_array (DBusMessageIter *iter, DBUS_TYPE_ARRAY, subsignature_str, &subiter)) - goto oom; + oom (); /* TODO - This assumes that basic values are the same size * is this always true? If it is we can probably avoid -- 1.7.4.1