aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/sunkbd.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-06-26 01:46:17 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2006-06-26 01:46:17 -0400
commitea08c6faa0a8dc93b016663de55e49822ed0b33f (patch)
treea1cc8a448e87457c8f8ed45d5f9f430369eb4062 /drivers/input/keyboard/sunkbd.c
parenta21466cc77b25dc2afd1292c79c7fc8fd454a1a7 (diff)
downloadkernel_goldelico_gta04-ea08c6faa0a8dc93b016663de55e49822ed0b33f.zip
kernel_goldelico_gta04-ea08c6faa0a8dc93b016663de55e49822ed0b33f.tar.gz
kernel_goldelico_gta04-ea08c6faa0a8dc93b016663de55e49822ed0b33f.tar.bz2
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/sunkbd.c')
-rw-r--r--drivers/input/keyboard/sunkbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c
index b15b6d8..9dbd7b8 100644
--- a/drivers/input/keyboard/sunkbd.c
+++ b/drivers/input/keyboard/sunkbd.c
@@ -263,7 +263,7 @@ static int sunkbd_connect(struct serio *serio, struct serio_driver *drv)
goto fail;
}
- sprintf(sunkbd->name, "Sun Type %d keyboard", sunkbd->type);
+ snprintf(sunkbd->name, sizeof(sunkbd->name), "Sun Type %d keyboard", sunkbd->type);
memcpy(sunkbd->keycode, sunkbd_keycode, sizeof(sunkbd->keycode));
input_dev->name = sunkbd->name;