projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mac80211: avoid NULL ptr deref when finding max_rates in PID and minstrel
[cascardo/linux.git]
/
net
/
mac80211
/
rc80211_pid_algo.c
diff --git
a/net/mac80211/rc80211_pid_algo.c
b/net/mac80211/rc80211_pid_algo.c
index
01d59a8
..
8bef9a1
100644
(file)
--- a/
net/mac80211/rc80211_pid_algo.c
+++ b/
net/mac80211/rc80211_pid_algo.c
@@
-378,7
+378,7
@@
static void *rate_control_pid_alloc(struct ieee80211_hw *hw,
for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
sband = hw->wiphy->bands[i];
- if (sband->n_bitrates > max_rates)
+ if (sband
&& sband
->n_bitrates > max_rates)
max_rates = sband->n_bitrates;
}