From: Daniel Stenberg Date: Wed, 17 Sep 2025 06:25:42 +0000 (+0200) Subject: setopt: make CURLOPT_MAXREDIRS accept -1 (again) X-Git-Tag: rc-8_17_0-1~371 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=92361999086712c7ae6ca59930cdac204e0db2a2;p=thirdparty%2Fcurl.git setopt: make CURLOPT_MAXREDIRS accept -1 (again) Regression from b059f7d (shipped in 8.16.0) Reported-by: Adam Light Fixes #18571 Closes #18576 --- diff --git a/lib/setopt.c b/lib/setopt.c index 6f98e7dce4..d7a7f6c52d 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -955,7 +955,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, break; case CURLOPT_MAXREDIRS: - result = value_range(&arg, -1, 0, 0x7fff); + result = value_range(&arg, -1, -1, 0x7fff); if(result) return result; s->maxredirs = (short)arg;