Commit d1ff320f authored by Daniel Kurtz's avatar Daniel Kurtz Committed by Dmitry Torokhov

Input: atmel_mxt_ts - verify object size in mxt_write_object

Don't allow writing past the length of an object.
Signed-off-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 71b3e938
......@@ -506,7 +506,7 @@ static int mxt_write_object(struct mxt_data *data,
u16 reg;
object = mxt_get_object(data, type);
if (!object)
if (!object || offset >= object->size + 1)
return -EINVAL;
reg = object->start_address;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment