diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-18 18:41:20 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-19 08:11:46 +0200 |
commit | 67521b5ecf0e3b0d8ea5278b02400811715069be (patch) | |
tree | b8963f3895eb50192c272b3a4bc5a09fa8cddf08 /lib/connect.c | |
parent | dbc5c1773845f9244d6c9a73f7a1069619322ddc (diff) | |
download | curl-67521b5ecf0e3b0d8ea5278b02400811715069be.tar.gz |
hostip: make Curl_printable_address not return anything
It was not used much anyway and instead we let it store a blank buffer
in case of failure.
Reported-by: MonocleAI
Fixes #5411
Closes #5418
Diffstat (limited to 'lib/connect.c')
-rw-r--r-- | lib/connect.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/connect.c b/lib/connect.c index 6eb33797b..c53fb7106 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -960,11 +960,12 @@ CURLcode Curl_is_connected(struct connectdata *conn, #ifndef CURL_DISABLE_VERBOSE_STRINGS char ipaddress[MAX_IPADR_LEN]; char buffer[STRERROR_LEN]; - Curl_printable_address(conn->tempaddr[i], ipaddress, MAX_IPADR_LEN); -#endif + Curl_printable_address(conn->tempaddr[i], ipaddress, + sizeof(ipaddress)); infof(data, "connect to %s port %ld failed: %s\n", ipaddress, conn->port, Curl_strerror(error, buffer, sizeof(buffer))); +#endif conn->timeoutms_per_addr = conn->tempaddr[i]->ai_next == NULL ? allow : allow / 2; |