summaryrefslogtreecommitdiff
path: root/xmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xmalloc.c')
-rw-r--r--xmalloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xmalloc.c b/xmalloc.c
index b48d33bb..67191e3f 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xmalloc.c,v 1.36 2019/11/12 22:32:48 djm Exp $ */
+/* $OpenBSD: xmalloc.c,v 1.37 2022/03/13 23:27:54 cheloha Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -91,8 +91,7 @@ xstrdup(const char *str)
len = strlen(str) + 1;
cp = xmalloc(len);
- strlcpy(cp, str, len);
- return cp;
+ return memcpy(cp, str, len);
}
int