From b700662b1c77c8af7e290538f748b71d75a79ae7 Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Fri, 27 Dec 2019 23:39:24 -0500 Subject: multi: Change curl_multi_wait/poll to error on negative timeout - Add new error CURLM_BAD_FUNCTION_ARGUMENT and return that error when curl_multi_wait/poll is passed timeout param < 0. Prior to this change passing a negative value to curl_multi_wait/poll such as -1 could cause the function to wait forever. Reported-by: hamstergene@users.noreply.github.com Fixes https://github.com/curl/curl/issues/4763 Closes https://github.com/curl/curl/pull/4765 --- docs/libcurl/libcurl-errors.3 | 4 +++- docs/libcurl/symbols-in-versions | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'docs/libcurl') diff --git a/docs/libcurl/libcurl-errors.3 b/docs/libcurl/libcurl-errors.3 index 0305af43e..ac06f27c7 100644 --- a/docs/libcurl/libcurl-errors.3 +++ b/docs/libcurl/libcurl-errors.3 @@ -147,7 +147,7 @@ Function not found. A required zlib function was not found. .IP "CURLE_ABORTED_BY_CALLBACK (42)" Aborted by callback. A callback returned "abort" to libcurl. .IP "CURLE_BAD_FUNCTION_ARGUMENT (43)" -Internal error. A function was called with a bad parameter. +A function was called with a bad parameter. .IP "CURLE_INTERFACE_FAILED (45)" Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections' source IP address with @@ -299,6 +299,8 @@ second time. (Added in 7.32.1) An API function was called from inside a callback. .IP "CURLM_WAKEUP_FAILURE (9)" Wakeup is unavailable or failed. +.IP "CURLM_BAD_FUNCTION_ARGUMENT (10)" +A function was called with a bad parameter. .SH "CURLSHcode" The "share" interface will return a CURLSHcode to indicate when an error has occurred. Also consider \fIcurl_share_strerror(3)\fP. diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions index b9cf71cc2..7a8078557 100644 --- a/docs/libcurl/symbols-in-versions +++ b/docs/libcurl/symbols-in-versions @@ -334,6 +334,7 @@ CURLMSG_DONE 7.9.6 CURLMSG_NONE 7.9.6 CURLM_ADDED_ALREADY 7.32.1 CURLM_BAD_EASY_HANDLE 7.9.6 +CURLM_BAD_FUNCTION_ARGUMENT 7.69.0 CURLM_BAD_HANDLE 7.9.6 CURLM_BAD_SOCKET 7.15.4 CURLM_CALL_MULTI_PERFORM 7.9.6 -- cgit v1.2.3