diff options
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Xinput.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Xinput.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index 7feb48c1e..b9753f01d 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -460,10 +460,9 @@ HostOS(void) if (*host_os == '\0') { if (uname(&name) >= 0) - strcpy(host_os, name.sysname); + strlcpy(host_os, name.sysname, sizeof(host_os)); else { - strncpy(host_os, "unknown", sizeof(host_os)); - host_os[sizeof(host_os)-1] = '\0'; + strlcpy(host_os, "unknown", sizeof(host_os)); } } return host_os; |