From 713f1f6ae0d7dd1c702f20e96d43220e2c86c998 Mon Sep 17 00:00:00 2001 From: Jaehyun Kim Date: Thu, 10 Jun 2021 18:17:25 +0900 Subject: [PATCH] Check the reply of SignalPoll method correctly Change-Id: Id48cb699743e62484fac775c7348c34f1e80ac8f Signed-off-by: Jaehyun Kim --- gsupplicant/supplicant.c | 7 ++++++- packaging/connman.spec | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index c727c07..f4abb07 100755 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -6398,7 +6398,12 @@ static void interface_signalpoll_result(const char *error, goto out; } - dbus_message_iter_get_arg_type(iter); + if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_VARIANT) { + err = -EINVAL; + SUPPLICANT_DBG("invalid reply"); + goto out; + } + dbus_message_iter_recurse(iter, &sub_iter); dbus_message_iter_recurse(&sub_iter, &dict); diff --git a/packaging/connman.spec b/packaging/connman.spec index 72c277a..db8a848 100644 --- a/packaging/connman.spec +++ b/packaging/connman.spec @@ -6,7 +6,7 @@ Name: connman Version: 1.38 -Release: 7 +Release: 8 License: GPL-2.0+ Summary: Connection Manager Url: http://connman.net -- 2.7.4