From: Daniel Stenberg Date: Fri, 7 Mar 2025 22:01:33 +0000 (+0100) Subject: setopt: illegal CURLOPT_SOCKS5_AUTH should return error X-Git-Tag: curl-8_13_0~220 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=36a831b86858f35d5e5486cab0b8802de790fe64;p=thirdparty%2Fcurl.git setopt: illegal CURLOPT_SOCKS5_AUTH should return error The check was just wrong before. Regression introduced in 30da1f5974d34841b30c4fac3 Bug: https://issues.oss-fuzz.com/issues/401430844 Closes #16617 --- diff --git a/lib/setopt.c b/lib/setopt.c index 930f90bb94..a402b5a270 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -689,7 +689,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, data->set.proxy_transfer_mode = (bool)uarg; break; case CURLOPT_SOCKS5_AUTH: - if(data->set.socks5auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI)) + if(uarg & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI)) return CURLE_NOT_BUILT_IN; data->set.socks5auth = (unsigned char)uarg; break;