Input: atmel_mxt_ts - verify object size in mxt_write_object
Don't allow writing past the length of an object. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
Родитель
71b3e938cb
Коммит
d1ff320f0a
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче