projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a39520e
)
gdbus: Check signature of property value before calling setter
author
Marcel Holtmann
<marcel@holtmann.org>
Sat, 5 Jan 2013 04:28:07 +0000
(20:28 -0800)
committer
Marcel Holtmann
<marcel@holtmann.org>
Sat, 5 Jan 2013 08:45:35 +0000
(
00:45
-0800)
gdbus/object.c
patch
|
blob
|
history
diff --git
a/gdbus/object.c
b/gdbus/object.c
index
e569acb
..
688cd05
100644
(file)
--- 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);