socks_sspi: invalid response length is a fatal error

Pointed out by Zeropath
Closes #21999
This commit is contained in:
Daniel Stenberg 2026-06-14 12:13:42 +02:00
parent 6b78264bcf
commit fb83911aa6
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -442,6 +442,7 @@ static CURLcode socks5_sspi_encrypt(struct Curl_cfilter *cf,
if(sspi_w_token[1].cbBuffer != 1) {
failf(data, "Invalid SSPI encryption response length (%lu).",
(unsigned long)sspi_w_token[1].cbBuffer);
goto fail;
}
memcpy(socksreq, sspi_w_token[1].pvBuffer, sspi_w_token[1].cbBuffer);