diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-09-17 15:13:36 +0200 |
---|---|---|
committer | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-09-27 10:28:27 +0200 |
commit | 10360400d3d128da50212513a18705149c5b9ce6 (patch) | |
tree | 5d892e07e081a6cd74185742387a9907633ec4be /src/session.c | |
parent | 2c6422970b54b28a3a5f3db4820100df43ced1bf (diff) | |
download | connman-10360400d3d128da50212513a18705149c5b9ce6.tar.gz connman-10360400d3d128da50212513a18705149c5b9ce6.tar.bz2 connman-10360400d3d128da50212513a18705149c5b9ce6.zip |
session: Check D-Bus argumets for Changed method
Diffstat (limited to 'src/session.c')
-rw-r--r-- | src/session.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/session.c b/src/session.c index 52ccb8bf..c7c72a56 100644 --- a/src/session.c +++ b/src/session.c @@ -1256,8 +1256,15 @@ static DBusMessage *change_session(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); switch (dbus_message_iter_get_arg_type(&value)) { |