summaryrefslogtreecommitdiffstats
path: root/compat/fakehid.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-25 17:48:40 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-25 17:48:40 +0200
commit1c195ab280da561f38e54449e4eb3d6882c69b3b (patch)
tree12583570730c9e5a1505416aa445666aa1449f6b /compat/fakehid.c
parentd7aa6d1b2d6f3fc48b8287ea04c741078b22f2da (diff)
Fix strncpy length parameters to avoid non-nul-terminated strings
Diffstat (limited to 'compat/fakehid.c')
-rw-r--r--compat/fakehid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/fakehid.c b/compat/fakehid.c
index bed05c36..438185d3 100644
--- a/compat/fakehid.c
+++ b/compat/fakehid.c
@@ -97,7 +97,7 @@ static int uinput_create(char *name, int keyboard, int mouse)
memset(&dev, 0, sizeof(dev));
if (name)
- strncpy(dev.name, name, UINPUT_MAX_NAME_SIZE);
+ strncpy(dev.name, name, UINPUT_MAX_NAME_SIZE - 1);
dev.id.bustype = BUS_BLUETOOTH;
dev.id.vendor = 0x0000;