mirror of
https://github.com/curl/curl.git
synced 2026-08-03 12:00:31 +03:00
Use memcpy instead of strcpy to improve performance.
This commit is contained in:
parent
60588b2455
commit
93844f64ef
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue