diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-03-04 20:34:19 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-03-04 20:34:19 -0800 |
commit | a4990946d6ae42a4f66439acca63668c61690990 (patch) | |
tree | a5749af5e5d04b93745e6b26b294d2571cfabf0e /src/service.c | |
parent | c4cac92c5c9928acae85e9e2d555c33b7ada0c50 (diff) | |
download | connman-a4990946d6ae42a4f66439acca63668c61690990.tar.gz connman-a4990946d6ae42a4f66439acca63668c61690990.tar.bz2 connman-a4990946d6ae42a4f66439acca63668c61690990.zip |
core: Add extra checks for set property methods
Diffstat (limited to 'src/service.c')
-rw-r--r-- | src/service.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c index 410a8da6..d301b2fd 100644 --- a/src/service.c +++ b/src/service.c @@ -2623,8 +2623,15 @@ static DBusMessage *set_property(DBusConnection *conn, if (dbus_message_iter_init(msg, &iter) == FALSE) return __connman_error_invalid_arguments(msg); + if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING) + return __connman_error_invalid_arguments(msg); + dbus_message_iter_get_basic(&iter, &name); dbus_message_iter_next(&iter); + + if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_VARIANT) + return __connman_error_invalid_arguments(msg); + dbus_message_iter_recurse(&iter, &value); type = dbus_message_iter_get_arg_type(&value); |