diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-03-29 16:30:41 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-10 15:20:28 -0400 |
commit | 88c868c43ba38ac3bab07bab4c45b4bc44c94357 (patch) | |
tree | c56c66967ebb4a33142a54ef94396340656399bf /net/mac80211/tx.c | |
parent | 32c5057b22a60b23353dda93c57e475856ca286c (diff) | |
download | talos-obmc-linux-88c868c43ba38ac3bab07bab4c45b4bc44c94357.tar.gz talos-obmc-linux-88c868c43ba38ac3bab07bab4c45b4bc44c94357.zip |
mac80211: sanity check for null SSID
While associated we should never have empty SSID, but life can be full
of surprises, and is allways better to print a warning than crash.
Before memcpy() in ieee80211_probereq_get() check ssid_len instead of
ssid pointer, sice pointer it always passed by "ssidie + 2" expression
to send probe functions, so practically never can be NULL.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 14a01c81f959..e0b89780b472 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2602,7 +2602,7 @@ struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw, pos = skb_put(skb, ie_ssid_len); *pos++ = WLAN_EID_SSID; *pos++ = ssid_len; - if (ssid) + if (ssid_len) memcpy(pos, ssid, ssid_len); pos += ssid_len; |