projects
/
profile
/
common
/
kernel-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f9857b
)
libertas: Read buffer overflow
author
Roel Kluin
<roel.kluin@gmail.com>
Sun, 2 Aug 2009 07:44:12 +0000
(09:44 +0200)
committer
John W. Linville
<linville@tuxdriver.com>
Mon, 3 Aug 2009 20:31:23 +0000
(16:31 -0400)
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>
drivers/net/wireless/libertas/11d.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/libertas/11d.c
b/drivers/net/wireless/libertas/11d.c
index
9a5408e
..
5c69681
100644
(file)
--- a/
drivers/net/wireless/libertas/11d.c
+++ b/
drivers/net/wireless/libertas/11d.c
@@
-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++) {