Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111182
b: refs/heads/master
c: d298487
h: refs/heads/master
v: v3
  • Loading branch information
Harvey Harrison authored and John W. Linville committed Aug 22, 2008
1 parent f7b7f85 commit 527cd6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c44d040e186e1af9d947f7bad886b7c1d35a22f6
refs/heads/master: d298487260d01934a8df3a4a2a09513d84a8e69b
7 changes: 3 additions & 4 deletions trunk/net/mac80211/wep.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,10 @@ int ieee80211_wep_decrypt(struct ieee80211_local *local, struct sk_buff *skb,
return -1;

hdrlen = ieee80211_hdrlen(hdr->frame_control);

if (skb->len < 8 + hdrlen)
if (skb->len < hdrlen + WEP_IV_LEN + WEP_ICV_LEN)
return -1;

len = skb->len - hdrlen - 8;
len = skb->len - hdrlen - WEP_IV_LEN - WEP_ICV_LEN;

keyidx = skb->data[hdrlen + 3] >> 6;

Expand Down Expand Up @@ -303,7 +302,7 @@ ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx)
} else if (!(rx->status->flag & RX_FLAG_IV_STRIPPED)) {
ieee80211_wep_remove_iv(rx->local, rx->skb, rx->key);
/* remove ICV */
skb_trim(rx->skb, rx->skb->len - 4);
skb_trim(rx->skb, rx->skb->len - WEP_ICV_LEN);
}

return RX_CONTINUE;
Expand Down

0 comments on commit 527cd6a

Please sign in to comment.