summaryrefslogtreecommitdiff
path: root/gdbus
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2013-01-04 20:28:07 -0800
committerMarcel Holtmann <marcel@holtmann.org>2013-01-05 00:46:04 -0800
commit827a60776641779d5089ce9dda8fc3c8bd027802 (patch)
tree410a10bcba39c6b35f9dcaefedadc645d5d22b23 /gdbus
parenta700b364b209ec08404d20cfd2b1d7787d04ac9d (diff)
downloadconnman-827a60776641779d5089ce9dda8fc3c8bd027802.tar.gz
connman-827a60776641779d5089ce9dda8fc3c8bd027802.tar.bz2
connman-827a60776641779d5089ce9dda8fc3c8bd027802.zip
gdbus: Check signature of property value before calling setter
Diffstat (limited to 'gdbus')
-rw-r--r--gdbus/object.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdbus/object.c b/gdbus/object.c
index e569acb9..688cd059 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -896,6 +896,11 @@ static DBusMessage *properties_set(DBusConnection *connection,
DBUS_ERROR_UNKNOWN_PROPERTY,
"No such property '%s'", name);
+ if (strcmp(dbus_message_iter_get_signature(&sub), property->type))
+ return g_dbus_create_error(message,
+ DBUS_ERROR_INVALID_SIGNATURE,
+ "Invalid signature for '%s'", name);
+
propdata = g_new(struct property_data, 1);
propdata->id = next_pending_property++;
propdata->message = dbus_message_ref(message);