提交 518ff04f 编写于 作者: J John W. Linville

orinoco: correct key bounds check in orinoco_hw_get_tkip_iv

If key is 4 that is an array out of bounds.
Reported-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 523d2f69
...@@ -70,7 +70,7 @@ int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc) ...@@ -70,7 +70,7 @@ int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc)
int err = 0; int err = 0;
u8 tsc_arr[4][IW_ENCODE_SEQ_MAX_SIZE]; u8 tsc_arr[4][IW_ENCODE_SEQ_MAX_SIZE];
if ((key < 0) || (key > 4)) if ((key < 0) || (key >= 4))
return -EINVAL; return -EINVAL;
err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENT_TKIP_IV, err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENT_TKIP_IV,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册