mwifiex: avoid out of bounds access in mwifiex_get_common_rates.
authorCyril Roelandt <tipecaml@gmail.com>
Sun, 27 Jan 2013 22:42:48 +0000 (23:42 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 30 Jan 2013 20:07:09 +0000 (15:07 -0500)
Check that the array indexes are in-bounds before accessing the rate2 and tmp
arrays.

Found with the following semantic patch:

<smpl>
@@
identifier t;
identifier idx;
expression E;
statement S;
@@
* for (... ; <+... t[idx] ...+> && idx < E ; ...)
S
</smpl>

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

No differences found