mirror of
https://github.com/curl/curl.git
synced 2026-08-20 09:23:55 +03:00
vtls: alpn setting, check proto parameter
When setting the negotiated alpn protocol, either then length must be 0 or a pointer must be passed. Reported in Joshua's sarif data Closes #18717
This commit is contained in:
parent
ccd2b03b0d
commit
cbc30d4ed2
1 changed files with 5 additions and 0 deletions
|
|
@ -1993,6 +1993,11 @@ CURLcode Curl_alpn_set_negotiated(struct Curl_cfilter *cf,
|
|||
result = CURLE_SSL_CONNECT_ERROR;
|
||||
goto out;
|
||||
}
|
||||
else if(!proto) {
|
||||
DEBUGASSERT(0); /* with length, we need a pointer */
|
||||
result = CURLE_SSL_CONNECT_ERROR;
|
||||
goto out;
|
||||
}
|
||||
else if((strlen(connssl->negotiated.alpn) != proto_len) ||
|
||||
memcmp(connssl->negotiated.alpn, proto, proto_len)) {
|
||||
failf(data, "ALPN: asked for '%s' from previous session, but server "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue