From: Jouni Malinen Date: Mon, 15 Apr 2019 17:54:12 +0000 (+0300) Subject: Fix debug print in GET_PREF_FREQ_LIST handler X-Git-Tag: hostap_2_8~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6ac47b47db70c77b2631b7669165a01f4de2ca8;p=thirdparty%2Fhostap.git Fix debug print in GET_PREF_FREQ_LIST handler 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 --- diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 564f32b85..198ac562d 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -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)