From 63e2536c9e31a39b151746ebde101dfaa28ac2fb Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 28 Mar 2011 17:26:56 +0100 Subject: [PATCH 18/25] marshal_collection_array: if appending fails, don't assume OOM Appending can also fail by appending ((gboolean) 23) or something; admittedly, that's a programming error. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=30171 --- dbus/dbus-gvalue.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dbus/dbus-gvalue.c b/dbus/dbus-gvalue.c index ab5580b..f36acb9 100644 --- a/dbus/dbus-gvalue.c +++ b/dbus/dbus-gvalue.c @@ -1974,7 +1974,14 @@ marshal_collection_array (DBusMessageIter *iter, subsignature_str[0], &(array->data), array->len)) - goto oom; + { + g_critical ("Unable to serialize %u GArray members as signature %s " + "(OOM or invalid boolean value?)", array->len, subsignature_str); + + g_free (subsignature_str); + dbus_message_iter_abandon_container (iter, &subiter); + return FALSE; + } if (!dbus_message_iter_close_container (iter, &subiter)) goto oom; -- 1.7.4.1