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:
@ -306,7 +306,7 @@ static int a3d_connect(struct gameport *gameport, struct gameport_driver *drv)
|
||||
gameport_set_poll_handler(gameport, a3d_poll);
|
||||
gameport_set_poll_interval(gameport, 20);
|
||||
|
||||
sprintf(a3d->phys, "%s/input0", gameport->phys);
|
||||
snprintf(a3d->phys, sizeof(a3d->phys), "%s/input0", gameport->phys);
|
||||
|
||||
input_dev->name = a3d_names[a3d->mode];
|
||||
input_dev->phys = a3d->phys;
|
||||
|
Reference in New Issue
Block a user