nl80211: Make sure scan frequency debug buffer is NUL terminated
In theory, os_snprintf() could have filled the buffer to the end and while the pos variable would not have been incremented beyond that, there would not necessarily be a NUL termination at the end. Force the array to end in NUL just in case. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
41d23254b9
commit
f628e6b30e
1 changed files with 1 additions and 0 deletions
|
@ -1737,6 +1737,7 @@ static void send_scan_event(struct wpa_driver_nl80211_data *drv, int aborted,
|
|||
}
|
||||
info->freqs = freqs;
|
||||
info->num_freqs = num_freqs;
|
||||
msg[sizeof(msg) - 1] = '\0';
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Scan included frequencies:%s",
|
||||
msg);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue