From 1c195ab280da561f38e54449e4eb3d6882c69b3b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 25 Feb 2009 17:48:40 +0200 Subject: Fix strncpy length parameters to avoid non-nul-terminated strings --- compat/fakehid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compat/fakehid.c') 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; -- cgit