diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2015-08-13 15:42:55 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-08-13 15:42:55 +0300 |
commit | 5f6f02cd49d61e9856ff2c337578316a1a1b3f88 (patch) | |
tree | fd2e6961e8f609af41dd4a282008e1bc52cfa7c7 /drivers/input/touchscreen/zforce_ts.c | |
parent | 3afa129a9de0957d72165cf08a54e5c69938011c (diff) | |
parent | cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f (diff) | |
download | linux-5f6f02cd49d61e9856ff2c337578316a1a1b3f88.tar.xz |
Merge tag 'v4.2-rc4' into devel
Linux 4.2-rc4
Diffstat (limited to 'drivers/input/touchscreen/zforce_ts.c')
-rw-r--r-- | drivers/input/touchscreen/zforce_ts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c index f58a196521a9..80285c71786e 100644 --- a/drivers/input/touchscreen/zforce_ts.c +++ b/drivers/input/touchscreen/zforce_ts.c @@ -429,7 +429,7 @@ static int zforce_read_packet(struct zforce_ts *ts, u8 *buf) goto unlock; } - if (buf[PAYLOAD_LENGTH] == 0) { + if (buf[PAYLOAD_LENGTH] == 0 || buf[PAYLOAD_LENGTH] > FRAME_MAXSIZE) { dev_err(&client->dev, "invalid payload length: %d\n", buf[PAYLOAD_LENGTH]); ret = -EIO; |