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
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 { · 56 unmodified lines
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;

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