EDMG: Validate pri channel lookup result before using it

At least in theory, hw_get_channel_freq() could return NULL, so add
error handling for that.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
master
Ben Wang 4 years ago committed by Jouni Malinen
parent a95144cf34
commit 61c0757618

@ -838,6 +838,8 @@ static int hostapd_is_usable_edmg(struct hostapd_iface *iface)
iface->freq, NULL,
iface->hw_features,
iface->num_hw_features);
if (!pri_chan)
return 0;
hostapd_encode_edmg_chan(iface->conf->enable_edmg,
iface->conf->edmg_channel,
pri_chan->chan,

Loading…
Cancel
Save