]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
D-Bus: Fix GONegotiationSuccess signal passphrase format
authorJouni Malinen <j@w1.fi>
Wed, 31 Dec 2014 09:41:11 +0000 (11:41 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 31 Dec 2014 09:44:42 +0000 (11:44 +0200)
Passphrase is a variable length string of (8..63 characters), not a byte
array of fixed 64 octets.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/dbus/dbus_new.c

index cbf9d325c5460ae043245db32f7b3403d731c512..228600acd661ce4a15523fb953e0d0ec4c0012d1 100644 (file)
@@ -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" :