staging: rtl8188eu: off by one in rtw_set_802_11_add_wep()

"keyid" is used as an offset into the ->dot11DefKey[] array.  The array
has 4 elements.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Dan Carpenter 2013-08-30 00:45:42 +03:00 committed by Greg Kroah-Hartman
parent 15f7af8be4
commit dc427fe72b
1 changed files with 1 additions and 1 deletions

View File

@ -566,7 +566,7 @@ _func_enter_;
keyid = wep->KeyIndex & 0x3fffffff;
if (keyid > 4) {
if (keyid >= 4) {
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("MgntActrtw_set_802_11_add_wep:keyid>4 =>fail\n"));
ret = false;
goto exit;