diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-06-02 08:05:42 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-06-02 08:05:42 +0200 |
| commit | f407a8258610169cd8e975dba7f0b2824562014c (patch) | |
| tree | 6c87b2d168a4665411a9e16b9f481599f2db25bc /net/mac80211/wep.c | |
| parent | 960d447b94b22ceba286917056871d1dac8da697 (diff) | |
| parent | c46a024ea5eb0165114dbbc8c82c29b7bcf66e71 (diff) | |
Merge branch 'linus' into sched/core, to resolve conflict
Conflicts:
arch/sparc/include/asm/topology_64.h
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/mac80211/wep.c')
| -rw-r--r-- | net/mac80211/wep.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c index a4220e92f0cc..efa3f48f1ec5 100644 --- a/net/mac80211/wep.c +++ b/net/mac80211/wep.c @@ -98,8 +98,7 @@ static u8 *ieee80211_wep_add_iv(struct ieee80211_local *local, hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); - if (WARN_ON(skb_tailroom(skb) < IEEE80211_WEP_ICV_LEN || - skb_headroom(skb) < IEEE80211_WEP_IV_LEN)) + if (WARN_ON(skb_headroom(skb) < IEEE80211_WEP_IV_LEN)) return NULL; hdrlen = ieee80211_hdrlen(hdr->frame_control); @@ -167,6 +166,9 @@ int ieee80211_wep_encrypt(struct ieee80211_local *local, size_t len; u8 rc4key[3 + WLAN_KEY_LEN_WEP104]; + if (WARN_ON(skb_tailroom(skb) < IEEE80211_WEP_ICV_LEN)) + return -1; + iv = ieee80211_wep_add_iv(local, skb, keylen, keyidx); if (!iv) return -1; |
