[-next] [bug report] media/IR/imon: array overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux