summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712/rtl871x_mlme.c
diff options
context:
space:
mode:
authorYoung Xiao <YangX92@hotmail.com>2018-11-28 08:06:53 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-05 09:56:09 +0100
commit300cd664865bed5d50ae0a42fb4e3a6f415e8a10 (patch)
tree94bb39ecf88f66750e1f78776c1bf066d93186f5 /drivers/staging/rtl8712/rtl871x_mlme.c
parent2595646791c319cadfdbf271563aac97d0843dc7 (diff)
downloadlinux-300cd664865bed5d50ae0a42fb4e3a6f415e8a10.tar.bz2
staging: rtl8712: Fix possible buffer overrun
In commit 8b7a13c3f404 ("staging: r8712u: Fix possible buffer overrun") we fix a potential off by one by making the limit smaller. The better fix is to make the buffer larger. This makes it match up with the similar code in other drivers. Fixes: 8b7a13c3f404 ("staging: r8712u: Fix possible buffer overrun") Signed-off-by: Young Xiao <YangX92@hotmail.com> Cc: stable <stable@vger.kernel.org> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_mlme.c')
-rw-r--r--drivers/staging/rtl8712/rtl871x_mlme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
index a7374006a9fb..986a1d526918 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.c
+++ b/drivers/staging/rtl8712/rtl871x_mlme.c
@@ -1346,7 +1346,7 @@ sint r8712_restruct_sec_ie(struct _adapter *adapter, u8 *in_ie,
u8 *out_ie, uint in_len)
{
u8 authmode = 0, match;
- u8 sec_ie[255], uncst_oui[4], bkup_ie[255];
+ u8 sec_ie[IW_CUSTOM_MAX], uncst_oui[4], bkup_ie[255];
u8 wpa_oui[4] = {0x0, 0x50, 0xf2, 0x01};
uint ielength, cnt, remove_cnt;
int iEntry;