[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 62/125: setopt: less *or equal* than INT_MAX/1000 s
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 62/125: setopt: less *or equal* than INT_MAX/1000 should be fine |
Date: |
Sun, 21 Jan 2018 23:41:57 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 9d7a59c8fa3faa98bc7e368baacc5756eea227e9
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Dec 11 15:24:42 2017 +0100
setopt: less *or equal* than INT_MAX/1000 should be fine
... for the CURLOPT_TIMEOUT, CURLOPT_CONNECTTIMEOUT and
CURLOPT_SERVER_RESPONSE_TIMEOUT range checks.
Reported-by: Dominik Hölzl
Bug: https://curl.haxx.se/mail/lib-2017-12/0037.html
Closes #2173
---
lib/setopt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/setopt.c b/lib/setopt.c
index bd5fb54d9..f40b78e0b 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -277,7 +277,7 @@ static CURLcode setopt(struct Curl_easy *data, CURLoption
option,
* before it is considered failure. For pingpong protocols.
*/
arg = va_arg(param, long);
- if((arg >= 0) && (arg < (INT_MAX/1000)))
+ if((arg >= 0) && (arg <= (INT_MAX/1000)))
data->set.server_response_timeout = arg * 1000;
else
return CURLE_BAD_FUNCTION_ARGUMENT;
@@ -1202,7 +1202,7 @@ static CURLcode setopt(struct Curl_easy *data, CURLoption
option,
* operation.
*/
arg = va_arg(param, long);
- if((arg >= 0) && (arg < (INT_MAX/1000)))
+ if((arg >= 0) && (arg <= (INT_MAX/1000)))
data->set.timeout = arg * 1000;
else
return CURLE_BAD_FUNCTION_ARGUMENT;
@@ -1220,7 +1220,7 @@ static CURLcode setopt(struct Curl_easy *data, CURLoption
option,
* The maximum time you allow curl to use to connect.
*/
arg = va_arg(param, long);
- if((arg >= 0) && (arg < (INT_MAX/1000)))
+ if((arg >= 0) && (arg <= (INT_MAX/1000)))
data->set.connecttimeout = arg * 1000;
else
return CURLE_BAD_FUNCTION_ARGUMENT;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 67/125: curl: support >256 bytes warning messsages, (continued)
- [GNUnet-SVN] [gnurl] 67/125: curl: support >256 bytes warning messsages, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 99/125: setopt: reintroduce non-static Curl_vsetopt() for OS400 support, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 82/125: build: Fixed incorrect script termination from commit ad1dc10e61, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 92/125: mail-rcpt.d: fix short-text description, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 102/125: configure.ac: append extra linker flags instead of prepending them., gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 112/125: SMB: fix numeric constant suffix and variable types, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 119/125: examples/url2file.c: add missing curl_global_cleanup() call, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 84/125: examples/cacertinmem: ignore cert-already-exists error, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 123/125: libcurl-env.3: first take, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 55/125: Revert "curl: don't set CURLOPT_INTERLEAVEDATA", gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 62/125: setopt: less *or equal* than INT_MAX/1000 should be fine,
gnunet <=
- [GNUnet-SVN] [gnurl] 68/125: conncache: fix a return code [regression], gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 65/125: examples/smtp-mail.c: use separate defines for options and mail, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 125/125: Merge branch 'master' of https://github.com/curl/curl, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 81/125: Makefile.vc: Added our standard copyright header, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 73/125: content_encoding: rework zlib_inflate, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 96/125: system.h: Additionally check __LONG_MAX__ for defining curl_off_t, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 107/125: docs: comment about CURLE_READ_ERROR returned by curl_mime_filedata, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 120/125: test558: fix for multissl builds, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 79/125: build: Added Visual Studio 2017 project files, gnunet, 2018/01/21