git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ 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
[safe/jmp/linux-2.6]
/
net
/
mac80211
/
rc80211_minstrel.c
diff --git
a/net/mac80211/rc80211_minstrel.c
b/net/mac80211/rc80211_minstrel.c
index
70df3dc
..
d9233ec
100644
(file)
--- a/
net/mac80211/rc80211_minstrel.c
+++ b/
net/mac80211/rc80211_minstrel.c
@@
-477,7
+477,7
@@
minstrel_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp)
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;
}