lkml.org 
[lkml]   [2015]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] clk: stm32: Fix out-by-one error path in the index lookup
From
Hi Daniel,

2015-06-28 11:55 GMT+02:00 Daniel Thompson <daniel.thompson@linaro.org>:
> If stm32f4_rcc_lookup() is called with primary == 0 and secondary == 192
> then it will read beyond the end of the table array due to an out-by-one
> error in the range check.
>
> In addition to the fixing the inequality we also modify the r.h.s. to
> make it even more explicit that we are comparing against the size of
> table in bits.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
> ---
> drivers/clk/clk-stm32f4.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Thanks for the patch.

Acked-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>

Regards,
Maxime


\
 
 \ /
  Last update: 2015-06-29 11:01    [W:0.050 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site