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>
This commit is contained in:
parent
a95144cf34
commit
61c0757618
1 changed files with 2 additions and 0 deletions
|
@ -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…
Reference in a new issue