linux/drivers/staging/rtl8723bs
Colin Ian King c51b46dd5b staging: rtl8723bs: add missing range check on id
The value of the u8 id needs to be upper bounds checked to ensure
the cam_cache array on the adapter dvobj is not indexed outside
of the allowed range of 0..TOTAL_CAM_ENTRY-1. This can currently
occur if id is >= TOTAL_CAM_ENTRY when calling write_cam_from_cache.
Fix this by adding an upper range check.

Detected by CoverityScan, CID#1428464 ("Use of untrusted scalar value")

Fixes: 554c0a3abf ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-22 11:00:58 +02:00
..
core staging: rtl8723bs: core: remove cast to void pointer 2017-08-29 08:24:04 +02:00
hal staging: rtl8723bs: hal: remove cast to void pointer 2017-08-29 08:24:04 +02:00
include staging: rtl8723bs - remove asm includes 2017-06-25 16:31:21 +02:00
os_dep staging: rtl8723bs: add missing range check on id 2017-09-22 11:00:58 +02:00
Kconfig
Makefile
TODO