mirror of
https://github.com/moparisthebest/curl
synced 2024-12-25 01:28:51 -05:00
lib: more %u for port and int for %*s fixes
Detected by Coverity Closes #7329
This commit is contained in:
parent
6a40e6f8be
commit
1ff1d9e179
@ -980,7 +980,7 @@ CURLcode Curl_is_connected(struct Curl_easy *data,
|
||||
char buffer[STRERROR_LEN];
|
||||
Curl_printable_address(conn->tempaddr[i], ipaddress,
|
||||
sizeof(ipaddress));
|
||||
infof(data, "connect to %s port %ld failed: %s\n",
|
||||
infof(data, "connect to %s port %u failed: %s\n",
|
||||
ipaddress, conn->port,
|
||||
Curl_strerror(error, buffer, sizeof(buffer)));
|
||||
#endif
|
||||
|
@ -3868,7 +3868,7 @@ static CURLcode servercert(struct Curl_easy *data,
|
||||
long len;
|
||||
ASN1_TIME_print(mem, X509_get0_notBefore(backend->server_cert));
|
||||
len = BIO_get_mem_data(mem, (char **) &ptr);
|
||||
infof(data, " start date: %.*s\n", len, ptr);
|
||||
infof(data, " start date: %.*s\n", (int)len, ptr);
|
||||
(void)BIO_reset(mem);
|
||||
|
||||
ASN1_TIME_print(mem, X509_get0_notAfter(backend->server_cert));
|
||||
|
@ -517,7 +517,7 @@ static const char *GTime2str(const char *beg, const char *end)
|
||||
return curl_maprintf("%.4s-%.2s-%.2s %.2s:%.2s:%c%c%s%.*s%s%.*s",
|
||||
beg, beg + 4, beg + 6,
|
||||
beg + 8, beg + 10, sec1, sec2,
|
||||
fracl? ".": "", fracl, fracp,
|
||||
fracl? ".": "", (int)fracl, fracp,
|
||||
sep, (int)tzl, tzp);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user