提交 d1ff320f 编写于 作者: D Daniel Kurtz 提交者: 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: NDaniel Kurtz <djkurtz@chromium.org>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册