mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-27 04:30:53 +07:00
libertas: Read buffer overflow
Check whether index is within bounds before testing the element. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
9f9857bb5e
commit
b929c633b4
@ -47,7 +47,7 @@ static u8 lbs_region_2_code(u8 *region)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
for (i = 0; region[i] && i < COUNTRY_CODE_LEN; i++)
|
||||
for (i = 0; i < COUNTRY_CODE_LEN && region[i]; i++)
|
||||
region[i] = toupper(region[i]);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(region_code_mapping); i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user