summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2022-06-27 15:11:41 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-06-27 15:27:37 -0700
commit039d4ed3428cf9c2052048d177880ebd02104764 (patch)
tree9dd2482033a882f0824ad6aa8d81b582dd260c3a /crypto
parent6ab2e51898cd4343bbdf8587af8ce8fbabddbcb5 (diff)
Input: usbtouchscreen - add driver_info sanity check
Add a sanity check on the device id-table driver_info field to make sure we never access a type structure (and function pointers) outside of the device info array (e.g. if someone fails to ifdef a device-id entry). Note that this also suppresses a compiler warning with -Warray-bounds (gcc-11.3.0) when compile-testing the driver without enabling any of the device type Kconfig options: drivers/input/touchscreen/usbtouchscreen.c: In function 'usbtouch_probe': drivers/input/touchscreen/usbtouchscreen.c:1668:16:warning: array subscript <unknown> is outside array bounds of 'struct usbtouch_device_info[0]' [-Warray-bounds] 1668 | type = &usbtouch_dev_info[id->driver_info]; Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20220623062446.16944-1-johan@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions