diff --git a/lib/strdup.c b/lib/strdup.c index e16e08a727..7807e3028c 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;