From 93844f64efcf8c5a291b26dc43b4d6057240a27b Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 1 May 2007 20:50:50 +0000 Subject: Use memcpy instead of strcpy to improve performance. --- lib/strdup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3