Skip to content

Commit 2da9d2b

Browse files
jigpudtor
authored andcommitted
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>
1 parent 62c3801 commit 2da9d2b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/input/touchscreen/wacom_w8001.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ MODULE_AUTHOR("Jaya Kumar <jayakumar.lkml@gmail.com>");
2727
MODULE_DESCRIPTION(DRIVER_DESC);
2828
MODULE_LICENSE("GPL");
2929

30+
#define W8001_MAX_PHYS 42
31+
3032
#define W8001_MAX_LENGTH 13
3133
#define W8001_LEAD_MASK 0x80
3234
#define W8001_LEAD_BYTE 0x80
@@ -89,7 +91,7 @@ struct w8001 {
8991
unsigned char response_type;
9092
unsigned char response[W8001_MAX_LENGTH];
9193
unsigned char data[W8001_MAX_LENGTH];
92-
char phys[32];
94+
char phys[W8001_MAX_PHYS];
9395
int type;
9496
unsigned int pktlen;
9597
u16 max_touch_x;

0 commit comments

Comments
 (0)