diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-06-26 01:46:17 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-06-26 01:46:17 -0400 |
commit | ea08c6faa0a8dc93b016663de55e49822ed0b33f (patch) | |
tree | a1cc8a448e87457c8f8ed45d5f9f430369eb4062 /drivers/input/keyboard/newtonkbd.c | |
parent | a21466cc77b25dc2afd1292c79c7fc8fd454a1a7 (diff) | |
download | linux-ea08c6faa0a8dc93b016663de55e49822ed0b33f.tar.gz linux-ea08c6faa0a8dc93b016663de55e49822ed0b33f.tar.bz2 linux-ea08c6faa0a8dc93b016663de55e49822ed0b33f.zip |
Input: fix potential overflows in driver/input/keyboard
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>
Diffstat (limited to 'drivers/input/keyboard/newtonkbd.c')
-rw-r--r-- | drivers/input/keyboard/newtonkbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/newtonkbd.c b/drivers/input/keyboard/newtonkbd.c index d10983c521e6..40a3f551247e 100644 --- a/drivers/input/keyboard/newtonkbd.c +++ b/drivers/input/keyboard/newtonkbd.c @@ -96,7 +96,7 @@ static int nkbd_connect(struct serio *serio, struct serio_driver *drv) nkbd->serio = serio; nkbd->dev = input_dev; - sprintf(nkbd->phys, "%s/input0", serio->phys); + snprintf(nkbd->phys, sizeof(nkbd->phys), "%s/input0", serio->phys); memcpy(nkbd->keycode, nkbd_keycode, sizeof(nkbd->keycode)); input_dev->name = "Newton Keyboard"; |