]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix debug print in GET_PREF_FREQ_LIST handler
authorJouni Malinen <jouni@codeaurora.org>
Mon, 15 Apr 2019 17:54:12 +0000 (20:54 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 15 Apr 2019 17:54:12 +0000 (20:54 +0300)
Do not use the buf argument to wpas_ctrl_iface_get_pref_freq_list() in
the debug print since it points to the response buffer ("OK\n" without
null termination). This was supposed to print the cmd argument instead.
The previous version ended up using uninitialized heap memory from the
response buffer.

Fixes: 983422088f00 ("nl80211: Add means to query preferred channels")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/ctrl_iface.c

index 564f32b85c082dcff927e4fec02a49268fa2bf2f..198ac562d8b6afdbfa949aa7ef19dc179bac514f 100644 (file)
@@ -7715,7 +7715,7 @@ static int wpas_ctrl_iface_get_pref_freq_list(
 
        wpa_printf(MSG_DEBUG,
                   "CTRL_IFACE: GET_PREF_FREQ_LIST iface_type=%d (%s)",
-                  iface_type, buf);
+                  iface_type, cmd);
 
        ret = wpa_drv_get_pref_freq_list(wpa_s, iface_type, &num, freq_list);
        if (ret)