]> git.ipfire.org Git - thirdparty/curl.git/commit
multi: Change curl_multi_wait/poll to error on negative timeout
authorJay Satiro <raysatiro@yahoo.com>
Sat, 28 Dec 2019 04:39:24 +0000 (23:39 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Sat, 11 Jan 2020 23:16:28 +0000 (18:16 -0500)
commitb700662b1c77c8af7e290538f748b71d75a79ae7
tree44a05779a834e1a21b2c1f242cc9e84758739c9a
parentea6d6205d9e13ce688afed28f6a09ade49b348d3
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
docs/libcurl/symbols-in-versions
include/curl/multi.h
lib/multi.c
lib/strerror.c
packages/OS400/curl.inc.in
tests/data/test1538