mirror of
https://github.com/curl/curl.git
synced 2026-07-24 04:17:18 +03:00
lib: rename Curl_strndup to Curl_memdup0 to avoid misunderstanding
Since the copy does not stop at a null byte, let's not call it anything that makes you think it works like the common strndup() function. Based on feedback from Jay Satiro, Stefan Eissing and Patrick Monnerat Closes #12490
This commit is contained in:
parent
6d8dc2f636
commit
7c992dd9f8
15 changed files with 27 additions and 27 deletions
|
|
@ -513,7 +513,7 @@ static CURLcode wssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
return CURLE_OK;
|
||||
}
|
||||
else if(name && (rc == WS_SUCCESS)) {
|
||||
sshc->homedir = Curl_strndup(name->fName, name->fSz);
|
||||
sshc->homedir = Curl_memdup0(name->fName, name->fSz);
|
||||
if(!sshc->homedir)
|
||||
sshc->actualcode = CURLE_OUT_OF_MEMORY;
|
||||
wolfSSH_SFTPNAME_list_free(name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue