Input: fix potential overflows in driver/input/joystick
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:
@ -220,7 +220,7 @@ static int spaceball_connect(struct serio *serio, struct serio_driver *drv)
|
||||
goto fail;
|
||||
|
||||
spaceball->dev = input_dev;
|
||||
sprintf(spaceball->phys, "%s/input0", serio->phys);
|
||||
snprintf(spaceball->phys, sizeof(spaceball->phys), "%s/input0", serio->phys);
|
||||
|
||||
input_dev->name = spaceball_names[id];
|
||||
input_dev->phys = spaceball->phys;
|
||||
|
Reference in New Issue
Block a user