Use memcpy instead of strcpy to improve performance.
This commit is contained in:
parent
60588b2455
commit
93844f64ef
@ -38,7 +38,7 @@ char *curlx_strdup(const char *str)
|
|||||||
if (!newstr)
|
if (!newstr)
|
||||||
return (char *)NULL;
|
return (char *)NULL;
|
||||||
|
|
||||||
strcpy(newstr,str);
|
memcpy(newstr,str,(len+1)*sizeof(char));
|
||||||
|
|
||||||
return newstr;
|
return newstr;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user