mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* leds: leds-tca6507: off by one in choose_times()
@ 2011-12-16 12:31 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-12-16 12:31 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-kernel

Hi Neil,

Smatch complains about 7a9244d89523 "leds: add driver for TCA6507 LED
controller"

drivers/leds/leds-tca6507.c +185 choose_times(16)
	error: buffer overflow 'time_codes' 16 <= 16

   184          for (c1 = 1; c1 <= TIMECODES; c1++) {
   185                  int t = time_codes[c1];
                                ^^^^^^^^^^^^^
We're reading 1 past the end of the array here.

   186                  if (t*2 < tmin)
   187                          continue;

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-16 12:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-16 12:31 leds: leds-tca6507: off by one in choose_times() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®