diff options
author | Niraj Kumar Goit <niraj.g@samsung.com> | 2021-01-27 19:14:08 +0530 |
---|---|---|
committer | Niraj Kumar Goit <niraj.g@samsung.com> | 2021-01-27 19:18:42 +0530 |
commit | cf94fb3ffa303075783f8b04285ca4bd0fb451c4 (patch) | |
tree | 39f5acd669d52066abfc8b9a9b5dee5f8606fdc5 /gsupplicant/supplicant.c | |
parent | 913f1e05c1f3ac7897646f76d873bf570064fc67 (diff) | |
download | connman-cf94fb3ffa303075783f8b04285ca4bd0fb451c4.tar.gz connman-cf94fb3ffa303075783f8b04285ca4bd0fb451c4.tar.bz2 connman-cf94fb3ffa303075783f8b04285ca4bd0fb451c4.zip |
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 <niraj.g@samsung.com>
Diffstat (limited to 'gsupplicant/supplicant.c')
-rwxr-xr-x | gsupplicant/supplicant.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 02e6a629..cfdb183a 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)) { |