summaryrefslogtreecommitdiff
path: root/lib/setopt.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-02-06 17:37:52 +0100
committerDaniel Stenberg <daniel@haxx.se>2023-02-06 23:42:27 +0100
commita0adda4b47d653cd079df22b9a749279678ada04 (patch)
treeebc41b6dfca715f63552c009305b6390213a9881 /lib/setopt.c
parent82123417fffda4f589e832558e366f1cbbdc4daf (diff)
downloadcurl-a0adda4b47d653cd079df22b9a749279678ada04.tar.gz
setopt: use >, not >=, when checking if uarg is larger than uint-max
Closes #10421
Diffstat (limited to 'lib/setopt.c')
-rw-r--r--lib/setopt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/setopt.c b/lib/setopt.c
index b897af100..b8c639847 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -1452,7 +1452,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
case CURLOPT_TIMEOUT_MS:
uarg = va_arg(param, unsigned long);
- if(uarg >= UINT_MAX)
+ if(uarg > UINT_MAX)
uarg = UINT_MAX;
data->set.timeout = (unsigned int)uarg;
break;
@@ -1470,7 +1470,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
case CURLOPT_CONNECTTIMEOUT_MS:
uarg = va_arg(param, unsigned long);
- if(uarg >= UINT_MAX)
+ if(uarg > UINT_MAX)
uarg = UINT_MAX;
data->set.connecttimeout = (unsigned int)uarg;
break;
@@ -1481,7 +1481,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
* The maximum time for curl to wait for FTP server connect
*/
uarg = va_arg(param, unsigned long);
- if(uarg >= UINT_MAX)
+ if(uarg > UINT_MAX)
uarg = UINT_MAX;
data->set.accepttimeout = (unsigned int)uarg;
break;
@@ -2981,7 +2981,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
break;
case CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS:
uarg = va_arg(param, unsigned long);
- if(uarg >= UINT_MAX)
+ if(uarg > UINT_MAX)
uarg = UINT_MAX;
data->set.happy_eyeballs_timeout = (unsigned int)uarg;
break;