cfg80211: mark regdomains with > NL80211_MAX_SUPP_REG_RULES invalid
Lets remain consistent and mark rds with > NL80211_MAX_SUPP_REG_RULES number of reg rules as invalid in is_valid_rd(). Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
02ba0b3263
commit
88dc1c3f7f
|
@ -352,6 +352,9 @@ static bool is_valid_rd(const struct ieee80211_regdomain *rd)
|
|||
if (!rd->n_reg_rules)
|
||||
return false;
|
||||
|
||||
if (WARN_ON(rd->n_reg_rules > NL80211_MAX_SUPP_REG_RULES))
|
||||
return false;
|
||||
|
||||
for (i = 0; i < rd->n_reg_rules; i++) {
|
||||
reg_rule = &rd->reg_rules[i];
|
||||
if (!is_valid_reg_rule(reg_rule))
|
||||
|
|
Loading…
Reference in New Issue