curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_TIMEOUT - INT_MAX/1000

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 11 Dec 2017 15:26:32 +0100 (CET)

On Mon, 11 Dec 2017, Hölzl, Dominik wrote:

> so configuring a value with INT_MAX/1000 would lead to
> CURLE_BAD_FUNCTION_ARGUMENT.
>
> Shouldn't be the check like
>
> if((arg >= 0) && (arg <= (INT_MAX/1000)))

Yes, I believe you're right. That then goes for the checks for
CURLOPT_TIMEOUT, CURLOPT_CONNECTTIMEOUT and CURLOPT_SERVER_RESPONSE_TIMEOUT as
they're done the same way.

I made a PR with this fix: https://github.com/curl/curl/pull/2173

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-12-11