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: 983422088f ("nl80211: Add means to query preferred channels")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2019-04-15 20:54:12 +03:00 committed by Jouni Malinen
parent 2e70e807c8
commit e6ac47b47d

View File

@ -7715,7 +7715,7 @@ static int wpas_ctrl_iface_get_pref_freq_list(
wpa_printf(MSG_DEBUG, wpa_printf(MSG_DEBUG,
"CTRL_IFACE: GET_PREF_FREQ_LIST iface_type=%d (%s)", "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); ret = wpa_drv_get_pref_freq_list(wpa_s, iface_type, &num, freq_list);
if (ret) if (ret)