This repository has been archived by the owner on Dec 14, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clk: stm32: Fix out-by-one error path in the index lookup
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 <[email protected]> Signed-off-by: Daniel Thompson <[email protected]> Acked-by: Maxime Coquelin <[email protected]> Fixes: 358bdf8 ("clk: stm32: Add clock driver for STM32F4[23]xxx devices") Signed-off-by: Stephen Boyd <[email protected]>
- Loading branch information