Re: [PATCH] clk: stm32: Fix out-by-one error path in the index lookup

From: Stephen Boyd
Date: Thu Jul 02 2015 - 12:56:28 EST


On 06/28, Daniel Thompson wrote:
> 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@xxxxxxxxxx>
> Signed-off-by: Daniel Thompson <daniel.thompson@xxxxxxxxxx>
> ---

Applied to clk-fixes

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/