diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-01-04 20:28:07 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2013-01-05 00:46:21 -0800 |
commit | e50bcc434fe0a8b04ce9646af8aedcde56d18401 (patch) | |
tree | 19939bdf0c2a5e9ebc11bfdf41632f5f1a1fe273 | |
parent | 908e08a597689cdd281e3520c4e35494b9a229cd (diff) | |
download | neard-e50bcc434fe0a8b04ce9646af8aedcde56d18401.tar.gz neard-e50bcc434fe0a8b04ce9646af8aedcde56d18401.tar.bz2 neard-e50bcc434fe0a8b04ce9646af8aedcde56d18401.zip |
gdbus: Check signature of property value before calling setter
-rw-r--r-- | gdbus/object.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdbus/object.c b/gdbus/object.c index e569acb..688cd05 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); |