Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: wacom_w8001 - allocate additional space for 'phys'

GCC warns that the output of our call to 'snprintf' in 'w8001_connect'
may be truncated since both 'serio->phys' and 'w8001->phys' are 32 bytes
in length. Increase the amount of space allocated for the latter to
compensate.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Jason Gerecke and committed by
Dmitry Torokhov
2da9d2b5 62c38016

+3 -1
+3 -1
drivers/input/touchscreen/wacom_w8001.c
··· 27 27 MODULE_DESCRIPTION(DRIVER_DESC); 28 28 MODULE_LICENSE("GPL"); 29 29 30 + #define W8001_MAX_PHYS 42 31 + 30 32 #define W8001_MAX_LENGTH 13 31 33 #define W8001_LEAD_MASK 0x80 32 34 #define W8001_LEAD_BYTE 0x80 ··· 91 89 unsigned char response_type; 92 90 unsigned char response[W8001_MAX_LENGTH]; 93 91 unsigned char data[W8001_MAX_LENGTH]; 94 - char phys[32]; 92 + char phys[W8001_MAX_PHYS]; 95 93 int type; 96 94 unsigned int pktlen; 97 95 u16 max_touch_x;