summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xtrans.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xtrans.c b/Xtrans.c
index 3f50f6a..d826996 100644
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -1349,7 +1349,7 @@ int TRANS(GetHostname) (char *buf, int maxlen)
uname (&name);
len = strlen (name.nodename);
if (len >= maxlen) len = maxlen - 1;
- strncpy (buf, name.nodename, len);
+ memcpy (buf, name.nodename, len);
buf[len] = '\0';
#else
buf[0] = '\0';