]> git.ipfire.org Git - thirdparty/hostap.git/commit
nl80211: Initialize full channel info struct even if channel is not known
authorJouni Malinen <j@w1.fi>
Sun, 22 Dec 2019 22:01:02 +0000 (00:01 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 22 Dec 2019 22:01:02 +0000 (00:01 +0200)
commit2c5ccfa60712005f739538c0ab7759698a7d0dc1
treeaadda911e30b0028bebe78a7ad64976f9e40fdd8
parentdbdd445d331464c2d4f942bf814d3da9bd39bbd3
nl80211: Initialize full channel info struct even if channel is not known

It was possible for the driver to advertise support for channels that
are not found from wpa_supplicant frequency-to-channel mapping (e.g.,
channel 182 at 5910 MHz) and that resulted in not initializing the
channel number information. Fix this by explicitly clearing the full
struct hostapd_channel_data buffer before parsing the information into
it from the driver.

This avoids some conditional jumps that could have dependent on
uninitialized values.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211_capa.c