From 92361999086712c7ae6ca59930cdac204e0db2a2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 17 Sep 2025 08:25:42 +0200 Subject: [PATCH] setopt: make CURLOPT_MAXREDIRS accept -1 (again) Regression from b059f7d (shipped in 8.16.0) Reported-by: Adam Light Fixes #18571 Closes #18576 --- lib/setopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3