All of lore.kernel.org
 help / color / mirror / Atom feed
* Out of bounds access in arch/arm/cpu/armv7/iproc-common/armpll.c
@ 2020-06-06 22:51 Heinrich Schuchardt
  2020-06-22 19:03 ` Scott Branden
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2020-06-06 22:51 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-22 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-06 22:51 Out of bounds access in arch/arm/cpu/armv7/iproc-common/armpll.c Heinrich Schuchardt
2020-06-22 19:03 ` Scott Branden

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.