mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:43:40 +03:00
openssl: associate/detach the transfer from connection
CVE-2021-22901 Bug: https://curl.se/docs/CVE-2021-22901.html
This commit is contained in:
parent
39ce47f219
commit
7f4a9a9b2a
13 changed files with 172 additions and 50 deletions
|
|
@ -878,8 +878,10 @@ bool Curl_multiplex_wanted(const struct Curl_multi *multi)
|
|||
void Curl_detach_connnection(struct Curl_easy *data)
|
||||
{
|
||||
struct connectdata *conn = data->conn;
|
||||
if(conn)
|
||||
if(conn) {
|
||||
Curl_llist_remove(&conn->easyq, &data->conn_queue, NULL);
|
||||
Curl_ssl_detach_conn(data, conn);
|
||||
}
|
||||
data->conn = NULL;
|
||||
}
|
||||
|
||||
|
|
@ -898,6 +900,7 @@ void Curl_attach_connnection(struct Curl_easy *data,
|
|||
&data->conn_queue);
|
||||
if(conn->handler->attach)
|
||||
conn->handler->attach(data, conn);
|
||||
Curl_ssl_associate_conn(data, conn);
|
||||
}
|
||||
|
||||
static int waitconnect_getsock(struct connectdata *conn,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue