setopt: illegal CURLOPT_SOCKS5_AUTH should return error

The check was just wrong before.

Regression introduced in 30da1f5974

Bug: https://issues.oss-fuzz.com/issues/401430844
Closes #16617
This commit is contained in:
Daniel Stenberg 2025-03-07 23:01:33 +01:00
parent 27d24690a4
commit 36a831b868
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View 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;