History

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.

Jason Gerecke committed 7 years ago

Commit 2da9d2b1 parent 62c38011 file · +3 −1Browse files

Unified · Split

drivers/input/touchscreen/wacom_w8001.c+3−1
@@ -27,6 +27,8 @@ MODULE_AUTHOR("Jaya Kumar <jayakumar.lkml@gmail.com>"); · 26 unmodified lines
27MODULE_DESCRIPTION(DRIVER_DESC);27MODULE_DESCRIPTION(DRIVER_DESC);
28MODULE_LICENSE("GPL");28MODULE_LICENSE("GPL");
29 29
30#define W8001_MAX_PHYS 42
31
30#define W8001_MAX_LENGTH 1332#define W8001_MAX_LENGTH 13
31#define W8001_LEAD_MASK 0x8033#define W8001_LEAD_MASK 0x80
32#define W8001_LEAD_BYTE 0x8034#define W8001_LEAD_BYTE 0x80
@@ -89,7 +91,7 @@ struct w8001 { · 56 unmodified lines
89 unsigned char response_type;91 unsigned char response_type;
90 unsigned char response[W8001_MAX_LENGTH];92 unsigned char response[W8001_MAX_LENGTH];
91 unsigned char data[W8001_MAX_LENGTH];93 unsigned char data[W8001_MAX_LENGTH];
92 char phys[32];94 char phys[W8001_MAX_PHYS];
93 int type;95 int type;
94 unsigned int pktlen;96 unsigned int pktlen;
95 u16 max_touch_x;97 u16 max_touch_x;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t