From: Dan Fandrich Date: Tue, 1 May 2007 20:50:50 +0000 (+0000) Subject: Use memcpy instead of strcpy to improve performance. X-Git-Tag: curl-7_16_3~131 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93844f64efcf8c5a291b26dc43b4d6057240a27b;p=thirdparty%2Fcurl.git Use memcpy instead of strcpy to improve performance. --- 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;