From: Niraj Kumar Goit Date: Wed, 27 Jan 2021 13:44:08 +0000 (+0530) Subject: Error checking in passphrase decryption method. X-Git-Tag: accepted/tizen/unified/20210225.130544^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf94fb3ffa303075783f8b04285ca4bd0fb451c4;p=platform%2Fupstream%2Fconnman.git Error checking in passphrase decryption method. If Dbus fails to append argument in dbus-message, do not call a dbus method to decrypt passphrase. Change-Id: Ic3b63ea9e6827ca1bf3753d750026119ec1bfd1a Signed-off-by: Niraj Kumar Goit --- diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 02e6a62..cfdb183 100755 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -7485,8 +7485,16 @@ static int send_decryption_request(const char *passphrase, if (!msg) return -EINVAL; +#if defined TIZEN_EXT + if (!dbus_message_append_args(msg, DBUS_TYPE_STRING, &passphrase, + DBUS_TYPE_INVALID)) { + SUPPLICANT_DBG("Could not fulfill decryption request"); + return -ENOMEM; + } +#else dbus_message_append_args(msg, DBUS_TYPE_STRING, &passphrase, DBUS_TYPE_INVALID); +#endif if (!dbus_connection_send_with_reply(connection, msg, &call, DBUS_TIMEOUT_USE_DEFAULT)) { diff --git a/packaging/connman.spec b/packaging/connman.spec index f1a29fa..aa1cfbb 100644 --- a/packaging/connman.spec +++ b/packaging/connman.spec @@ -6,7 +6,7 @@ Name: connman Version: 1.38 -Release: 3 +Release: 4 License: GPL-2.0+ Summary: Connection Manager Url: http://connman.net