From c05bb7cd897e5c29c9cbcceacfc81c9ffa383b62 Mon Sep 17 00:00:00 2001 From: Roland Baer Date: Fri, 24 Aug 2007 15:25:13 +0300 Subject: [PATCH] Check return value of dbus_message_iter_open_container() --- plugins/dbus.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/dbus.c b/plugins/dbus.c index 73cb8b6..5644dff 100644 --- a/plugins/dbus.c +++ b/plugins/dbus.c @@ -1227,8 +1227,13 @@ dbusAppendListOptionValue (CompDisplay *display, sig[1] = '\0'; dbus_message_iter_init_append (message, &iter); - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, - sig, &listIter); + if (!dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, + sig, &listIter)) + { + compLogMessage (display, "dbus", CompLogLevelError, + "dbus_bus_get error: %s", "out of memory"); + return; + } for (i = 0; i < value->list.nValue; i++) { -- 1.5.2.4