Skip to content

Commit 3213afb

Browse files
committed
Revert "Input: zforce - don't overwrite the stack"
This reverts commit 7d01cd2 because with given FRAME_MAXSIZE of 257 the check will never trigger and it causes warnings from GCC (with -Wtype-limits). Also the check was incorrect as it was not accounting for the already read 2 bytes of data stored in the buffer.
1 parent d580692 commit 3213afb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/touchscreen/zforce_ts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ static int zforce_read_packet(struct zforce_ts *ts, u8 *buf)
429429
goto unlock;
430430
}
431431

432-
if (buf[PAYLOAD_LENGTH] == 0 || buf[PAYLOAD_LENGTH] > FRAME_MAXSIZE) {
432+
if (buf[PAYLOAD_LENGTH] == 0) {
433433
dev_err(&client->dev, "invalid payload length: %d\n",
434434
buf[PAYLOAD_LENGTH]);
435435
ret = -EIO;

0 commit comments

Comments
 (0)