libertas: Read buffer overflow
PATCH 1/1 libertas: Read buffer overflow
Check whether index is within bounds before testing the element.
Signed-off-by Roel Kluin <[email protected]>
---
drivers/net/wireless/libertas/11d.c +1 -1
@@ -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++) {
Quoted 3 lines · Roel Kluin
Check whether index is within bounds before testing the element.
Signed-off-by Roel Kluin <[email protected]>
Acked-by Dan Williams <[email protected]>
Quoted 18 lines
---
drivers/net/wireless/libertas/11d.c +1
-2@@ -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++) { --To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html