diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2007-05-01 20:50:50 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2007-05-01 20:50:50 +0000 |
commit | 93844f64efcf8c5a291b26dc43b4d6057240a27b (patch) | |
tree | 34fbef79abc712ca255f4147b2056ac8db99074e /lib | |
parent | 60588b2455a8eeeef9056f2819f7ecc0f11b82e2 (diff) |
Use memcpy instead of strcpy to improve performance.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/strdup.c | 2 |
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; |