nl80211: Check nla_parse_nested() result
This recently added instance did not verify that parsing of nested
attributes succeeded.
Fixes: 15bf093b5b
("hostapd: Fetch multiple radios information from the driver")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
ba6b3dc78e
commit
2d92cae655
1 changed files with 3 additions and 4 deletions
|
@ -2754,10 +2754,9 @@ static int phy_multi_hw_info_parse(struct hostapd_multi_hw_info *hw_info,
|
|||
hw_info->hw_idx = nla_get_u32(radio_attr);
|
||||
return NL_OK;
|
||||
case NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE:
|
||||
nla_parse_nested(tb_freq, NL80211_WIPHY_RADIO_FREQ_ATTR_MAX,
|
||||
radio_attr, NULL);
|
||||
|
||||
if (!tb_freq[NL80211_WIPHY_RADIO_FREQ_ATTR_START] ||
|
||||
if (nla_parse_nested(tb_freq, NL80211_WIPHY_RADIO_FREQ_ATTR_MAX,
|
||||
radio_attr, NULL) ||
|
||||
!tb_freq[NL80211_WIPHY_RADIO_FREQ_ATTR_START] ||
|
||||
!tb_freq[NL80211_WIPHY_RADIO_FREQ_ATTR_END])
|
||||
return NL_STOP;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue