mirror of
https://github.com/curl/curl.git
synced 2026-08-26 14:23:32 +03:00
tftp: mark protocol as not possible to do over CONNECT
... and make connect_init() refusing trying to tunnel protocols marked as not working. Avoids a double-free. Reported-by: Even Rouault Fixes #8018 Closes #8020
This commit is contained in:
parent
2511a41bf9
commit
4d97fe5473
4 changed files with 14 additions and 7 deletions
|
|
@ -158,6 +158,10 @@ static CURLcode connect_init(struct Curl_easy *data, bool reinit)
|
|||
{
|
||||
struct http_connect_state *s;
|
||||
struct connectdata *conn = data->conn;
|
||||
if(conn->handler->flags & PROTOPT_NOTCPPROXY) {
|
||||
failf(data, "%s cannot be done over CONNECT", conn->handler->scheme);
|
||||
return CURLE_UNSUPPORTED_PROTOCOL;
|
||||
}
|
||||
if(!reinit) {
|
||||
CURLcode result;
|
||||
DEBUGASSERT(!conn->connect_state);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue