mirror of
https://github.com/curl/curl.git
synced 2026-08-04 03:40:01 +03:00
lib: fix type of len passed to *printf's %*s
... it needs to be 'int'. Detected by Coverity CID 1486611 (etc) Closes #7326
This commit is contained in:
parent
d696ee00ee
commit
78fc6522c2
3 changed files with 5 additions and 4 deletions
|
|
@ -146,7 +146,8 @@ CURLcode Curl_output_digest(struct Curl_easy *data,
|
|||
tmp = strchr((char *)uripath, '?');
|
||||
if(tmp) {
|
||||
size_t urilen = tmp - (char *)uripath;
|
||||
path = (unsigned char *) aprintf("%.*s", urilen, uripath);
|
||||
/* typecast is fine here since the value is always less than 32 bits */
|
||||
path = (unsigned char *) aprintf("%.*s", (int)urilen, uripath);
|
||||
}
|
||||
}
|
||||
if(!tmp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue