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:
@@ -177,7 +177,7 @@ static int spaceorb_connect(struct serio *serio, struct serio_driver *drv)
|
||||
goto fail;
|
||||
|
||||
spaceorb->dev = input_dev;
|
||||
sprintf(spaceorb->phys, "%s/input0", serio->phys);
|
||||
snprintf(spaceorb->phys, sizeof(spaceorb->phys), "%s/input0", serio->phys);
|
||||
|
||||
input_dev->name = "SpaceTec SpaceOrb 360 / Avenger";
|
||||
input_dev->phys = spaceorb->phys;
|
||||
|
Reference in New Issue
Block a user