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:
@@ -148,7 +148,7 @@ static int stinger_connect(struct serio *serio, struct serio_driver *drv)
|
||||
goto fail;
|
||||
|
||||
stinger->dev = input_dev;
|
||||
sprintf(stinger->phys, "%s/serio0", serio->phys);
|
||||
snprintf(stinger->phys, sizeof(stinger->phys), "%s/serio0", serio->phys);
|
||||
|
||||
input_dev->name = "Gravis Stinger";
|
||||
input_dev->phys = stinger->phys;
|
||||
|
Reference in New Issue
Block a user