diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-06-26 01:45:10 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-06-26 01:45:10 -0400 |
commit | 08ffce4560e0133e10634b0dd85eecee11257a1c (patch) | |
tree | eff2a0266e0897e72e48db949fb28f367812222e /drivers/input/mouse/sermouse.c | |
parent | 4854c7b27f0975a2b629f35ea3996d2968eb7c4f (diff) |
Input: fix potential overflows in driver/input/mouse
Change all sprintfs into snprintfs to make sure we won't stomp on
data adjacent to our buffers.
Noticed by Wouter Paesen <wouter@kangaroot.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/sermouse.c')
-rw-r--r-- | drivers/input/mouse/sermouse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/sermouse.c b/drivers/input/mouse/sermouse.c index 2f9a04ae725..a8974243171 100644 --- a/drivers/input/mouse/sermouse.c +++ b/drivers/input/mouse/sermouse.c @@ -254,7 +254,7 @@ static int sermouse_connect(struct serio *serio, struct serio_driver *drv) goto fail; sermouse->dev = input_dev; - sprintf(sermouse->phys, "%s/input0", serio->phys); + snprintf(sermouse->phys, sizeof(sermouse->phys), "%s/input0", serio->phys); sermouse->type = serio->id.proto; input_dev->name = sermouse_protocols[sermouse->type]; |