public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [-next] [bug report] media/IR/imon: array overflow
@ 2010-05-04 12:20 Dan Carpenter
  2010-05-04 14:03 ` [PATCH] IR/imon: remove dead IMON_KEY_RELEASE_OFFSET Jarod Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2010-05-04 12:20 UTC (permalink / raw)
  To: jarod; +Cc: linux-media

This is a Smatch thing.  I'm not sure what's intended.

drivers/media/IR/imon.c +1211 imon_panel_key_lookup(10) error: buffer overflow 'imon_panel_key_table' 21 <= 21
  1207          for (i = 0; i < ARRAY_SIZE(imon_panel_key_table); i++)
  1208                  if (imon_panel_key_table[i].hw_code == (code | 0xffee))
  1209                          break;

After the for loop i can be 0 to 21.

  1210
  1211          keycode = imon_panel_key_table[i % IMON_KEY_RELEASE_OFFSET].keycode;

IMON_KEY_RELEASE_OFFSET is 1000 so it doesn't affect anything.

regards,
dan carpenter

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

end of thread, other threads:[~2010-05-07 13:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 12:20 [-next] [bug report] media/IR/imon: array overflow Dan Carpenter
2010-05-04 14:03 ` [PATCH] IR/imon: remove dead IMON_KEY_RELEASE_OFFSET Jarod Wilson
2010-05-04 16:06   ` Dan Carpenter
2010-05-04 19:17     ` [PATCH v2] " Jarod Wilson
2010-05-07 11:52       ` Mauro Carvalho Chehab
2010-05-07 13:13         ` Jarod Wilson

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