1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/staging/r8188eu
Dan Carpenter 37f12202c5 staging: r8188eu: prevent array underflow in rtw_hal_update_ra_mask()
The problem is that "mac_id" is a u32 so this check for underflow does
not work when "mac_id" is zero.  In that situation, "mac_id - 1" is
UINT_MAX instead of -1 so the condition is true.  It leads to an
array underflow on the next line.

Fixes: 8cd574e6af ("staging: r8188eu: introduce new hal dir for RTL8188eu driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210930122604.GB10068@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05 12:35:30 +02:00
..
core
hal staging: r8188eu: prevent array underflow in rtw_hal_update_ra_mask() 2021-10-05 12:35:30 +02:00
include IIO / Staging driver update for 5.15-rc1 2021-09-01 09:45:57 -07:00
os_dep staging: r8188eu: fix -Wrestrict warnings 2021-09-20 12:33:22 +02:00
Kconfig
Makefile IIO / Staging driver update for 5.15-rc1 2021-09-01 09:45:57 -07:00
TODO