Out of bounds access in arch/arm/cpu/armv7/iproc-common/armpll.c

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Jun 7 00:51:01 CEST 2020


Hello Scott,

CppCheck gives an error:

[arch/arm/cpu/armv7/iproc-common/armpll.c:137]: (error) Array
'armpll_clk_tab[13]' accessed at index 17, which is out of bounds.

In the loop at the start of armpll_config() i is determined. The maximum
value of i after checking status in line 53 is 12.

In line 137 your code accesses

armpll_clk_tab[i+4].freqid

The patch where you introduced the code dates from 2014. But hopefully
you still remember what you intended to do in that line.

Best regards

Heinrich


More information about the U-Boot mailing list