mirror of
https://github.com/curl/curl.git
synced 2026-07-26 12:57:18 +03:00
lib: remove strlen call from Curl_client_write
At all call sites with an explicit 0 len, pass an appropriate nonzero len. Closes #6954
This commit is contained in:
parent
6aae7b1761
commit
f4b85d24b2
4 changed files with 19 additions and 15 deletions
|
|
@ -666,7 +666,7 @@ static ssize_t ldap_recv(struct Curl_easy *data, int sockindex, char *buf,
|
|||
|
||||
data->req.bytecount += bvals[i].bv_len + 1;
|
||||
}
|
||||
writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 0);
|
||||
writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
|
||||
if(writeerr) {
|
||||
*err = writeerr;
|
||||
return -1;
|
||||
|
|
@ -675,14 +675,14 @@ static ssize_t ldap_recv(struct Curl_easy *data, int sockindex, char *buf,
|
|||
data->req.bytecount++;
|
||||
}
|
||||
ber_memfree(bvals);
|
||||
writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 0);
|
||||
writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
|
||||
if(writeerr) {
|
||||
*err = writeerr;
|
||||
return -1;
|
||||
}
|
||||
data->req.bytecount++;
|
||||
}
|
||||
writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 0);
|
||||
writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
|
||||
if(writeerr) {
|
||||
*err = writeerr;
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue