projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6de9a2e
)
staging: wilc1000: off by one in get_handler_from_id()
author
Dan Carpenter
<
[email protected]
>
Tue, 15 Sep 2015 06:54:33 +0000
(09:54 +0300)
committer
Greg Kroah-Hartman
<
[email protected]
>
Tue, 15 Sep 2015 13:34:44 +0000
(06:34 -0700)
The > should be >= here or we read beyond the end of the array.
Fixes: d42ab0838d04 ('staging: wilc1000: use id value as argument')
Signed-off-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/wilc1000/host_interface.c
patch
|
blob
|
history
diff --git
a/drivers/staging/wilc1000/host_interface.c
b/drivers/staging/wilc1000/host_interface.c
index 59a1a9d93d6a2f9fc2d028ecfd6daa131081778e..621fd1867633d418642630a1acac37c68c3b5339 100644
(file)
--- a/
drivers/staging/wilc1000/host_interface.c
+++ b/
drivers/staging/wilc1000/host_interface.c
@@
-637,7
+637,7
@@
static int get_id_from_handler(tstrWILC_WFIDrv *handler)
static tstrWILC_WFIDrv *get_handler_from_id(int id)
{
- if (id <= 0 || id > ARRAY_SIZE(wfidrv_list))
+ if (id <= 0 || id >
=
ARRAY_SIZE(wfidrv_list))
return NULL;
return wfidrv_list[id];
}