From 68bb0077434b5f8d3f7129b1f225a3cc1047587c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 31 Dec 2014 11:41:11 +0200 Subject: [PATCH] D-Bus: Fix GONegotiationSuccess signal passphrase format Passphrase is a variable length string of (8..63 characters), not a byte array of fixed 64 octets. Signed-off-by: Jouni Malinen --- wpa_supplicant/dbus/dbus_new.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c index cbf9d325c..228600acd 100644 --- a/wpa_supplicant/dbus/dbus_new.c +++ b/wpa_supplicant/dbus/dbus_new.c @@ -1363,13 +1363,10 @@ void wpas_dbus_signal_p2p_go_neg_resp(struct wpa_supplicant *wpa_s, int i = 0; int freq_list_num = 0; - if (res->role_go) { - if (!wpa_dbus_dict_append_byte_array( - &dict_iter, "passphrase", - (const char *) res->passphrase, - sizeof(res->passphrase))) - goto err; - } + if (res->role_go && + !wpa_dbus_dict_append_string(&dict_iter, "passphrase", + res->passphrase)) + goto err; if (!wpa_dbus_dict_append_string(&dict_iter, "role_go", res->role_go ? "GO" :