aboutsummaryrefslogtreecommitdiff
path: root/lib/strdup.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/strdup.c')
-rw-r--r--lib/strdup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/strdup.c b/lib/strdup.c
index e16e08a72..7807e3028 100644
--- a/lib/strdup.c
+++ b/lib/strdup.c
@@ -38,7 +38,7 @@ char *curlx_strdup(const char *str)
if (!newstr)
return (char *)NULL;
- strcpy(newstr,str);
+ memcpy(newstr,str,(len+1)*sizeof(char));
return newstr;