summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-30 00:45:42 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-30 11:46:47 -0700
commitdc427fe72bcb281a3ff07183da2d4f277f41524e (patch)
treed0a0787bac644c40efba403ef3ff52f17dab3b9c /drivers/staging/rtl8188eu
parent15f7af8be40e7db5cd642d2ffbbe15e5d8bc1ed8 (diff)
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>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_ioctl_set.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 47fb253fff17..193f641bd0de 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -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;