mirror of
https://github.com/curl/curl.git
synced 2026-04-19 10:31:14 +03:00
urlapi: skip a strlen(), pass in zero
... to let curl_easy_escape() itself do the strlen. This avoids a (false positive) Coverity warning and it avoids us having to store the strlen() return value in an int variable. Reviewed-by: Daniel Gustafsson Closes #7862
This commit is contained in:
parent
ccb466fd36
commit
efffa66f65
2 changed files with 2 additions and 3 deletions
|
|
@ -1295,8 +1295,7 @@ CURLUcode curl_url_get(CURLU *u, CURLUPart what,
|
|||
}
|
||||
}
|
||||
else if(urlencode) {
|
||||
int hostlen = (int)strlen(u->host);
|
||||
allochost = curl_easy_escape(NULL, u->host, hostlen);
|
||||
allochost = curl_easy_escape(NULL, u->host, 0);
|
||||
if(!allochost)
|
||||
return CURLUE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<info>
|
||||
<keywords>
|
||||
unittest
|
||||
URL API
|
||||
URLAPI
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue