]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
setopt: illegal CURLOPT_SOCKS5_AUTH should return error
authorDaniel Stenberg <daniel@haxx.se>
Fri, 7 Mar 2025 22:01:33 +0000 (23:01 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 7 Mar 2025 22:32:31 +0000 (23:32 +0100)
The check was just wrong before.

Regression introduced in 30da1f5974d34841b30c4fac3

Bug: https://issues.oss-fuzz.com/issues/401430844
Closes #16617

lib/setopt.c

index 930f90bb9448050322b625a47913fc6dfa80528e..a402b5a270140f2804bc388d15d35514ccd24da9 100644 (file)
@@ -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;