]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
socks_sspi: invalid response length is a fatal error
authorDaniel Stenberg <daniel@haxx.se>
Sun, 14 Jun 2026 10:13:42 +0000 (12:13 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 14 Jun 2026 10:29:38 +0000 (12:29 +0200)
Pointed out by Zeropath
Closes #21999

lib/socks_sspi.c

index 8ab538fba1643786e5444b38ff9875a02d86c9e0..ef3d1c6ba02fdc837bbb99768d5f77766ad1587e 100644 (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);