RE: [PATCH] mwifiex: avoid out of bounds access in mwifiex_get_common_rates.

2013-01-28 Thread Bing Zhao
Hi Cyril, Thanks for your patch. > Check that the array indexes are in-bounds before accessing the rate2 and tmp > arrays. > > Found with the following semantic patch: > > > @@ > identifier t; > identifier idx; > expression E; > statement S; > @@ > * for (... ; <+... t[idx] ...+> && idx < E ;

RE: [PATCH] mwifiex: avoid out of bounds access in mwifiex_get_common_rates.

2013-01-28 Thread Bing Zhao
Hi Cyril, Thanks for your patch. 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