mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
a21466cc77
commit
ea08c6faa0
5 changed files with 16 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue