Skip to content

Commit

Permalink
orinoco: correct key bounds check in orinoco_hw_get_tkip_iv
Browse files Browse the repository at this point in the history
If key is 4 that is an array out of bounds.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
John W. Linville committed Aug 17, 2009
1 parent 523d2f6 commit 518ff04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/orinoco/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc)
int err = 0;
u8 tsc_arr[4][IW_ENCODE_SEQ_MAX_SIZE];

if ((key < 0) || (key > 4))
if ((key < 0) || (key >= 4))
return -EINVAL;

err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENT_TKIP_IV,
Expand Down

0 comments on commit 518ff04

Please sign in to comment.