mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
f051ae4f6c
gcc -Warray-bounds warns about a serious bug in
cyapa_pip_retrieve_data_structure:
drivers/input/mouse/cyapa_gen6.c: In function 'cyapa_pip_retrieve_data_structure.constprop':
include/linux/unaligned/access_ok.h:40:17: warning: array subscript -1 is outside array bounds of 'struct retrieve_data_struct_cmd[1]' [-Warray-bounds]
40 | *((__le16 *)p) = cpu_to_le16(val);
drivers/input/mouse/cyapa_gen6.c:569:13: note: while referencing 'cmd'
569 | } __packed cmd;
| ^~~
Apparently the '-2' was added to the pointer instead of the value,
writing garbage into the stack next to this variable.
Fixes:
|
||
---|---|---|
.. | ||
gameport | ||
joystick | ||
keyboard | ||
misc | ||
mouse | ||
rmi4 | ||
serio | ||
tablet | ||
touchscreen | ||
apm-power.c | ||
evbug.c | ||
evdev.c | ||
ff-core.c | ||
ff-memless.c | ||
input-compat.c | ||
input-compat.h | ||
input-leds.c | ||
input-mt.c | ||
input-poller.c | ||
input-poller.h | ||
input.c | ||
joydev.c | ||
Kconfig | ||
Makefile | ||
matrix-keymap.c | ||
mousedev.c | ||
sparse-keymap.c |