Input: fix potential overflows in driver/input/touchscreen
Change all sprintfs into snprintfs to make sure we won't stomp on data adjacent to our buffers. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
@@ -143,7 +143,7 @@ static int mtouch_connect(struct serio *serio, struct serio_driver *drv)
|
||||
|
||||
mtouch->serio = serio;
|
||||
mtouch->dev = input_dev;
|
||||
sprintf(mtouch->phys, "%s/input0", serio->phys);
|
||||
snprintf(mtouch->phys, sizeof(mtouch->phys), "%s/input0", serio->phys);
|
||||
|
||||
input_dev->private = mtouch;
|
||||
input_dev->name = "MicroTouch Serial TouchScreen";
|
||||
|
Reference in New Issue
Block a user