staging: r8712u: Fix possible out-of-bounds index with TKIP and AES keys
commit447ff8865209e48e231de804c47eb4677f2318be
authorLarry Finger <Larry.Finger@lwfinger.net>
Sat, 8 Oct 2011 19:01:06 +0000 (8 14:01 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 Oct 2011 16:02:49 +0000 (11 10:02 -0600)
treebf6e2b66e8667692df3dad8aa7a248b11a03f01b
parent8550be08cbed164a8357491cc2c27cb99282b7ff
staging: r8712u: Fix possible out-of-bounds index with TKIP and AES keys

Array XGrpKey has only 2 elements and uses (keyid - 1) as the index, which
allows the possibility of memory corruption from an out-of-bounds index.

This problem was reported by a new version of smatch.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rtl8712/rtl871x_mlme.c