1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 06:25:03 -05:00

quiche: fix crash when failing to connect

Reported-by: ウさん
Fixes #6664
Closes #6701
This commit is contained in:
Daniel Stenberg 2021-03-08 11:28:41 +01:00
parent b899cb08c6
commit ec549aa625
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 5 additions and 1 deletions

View File

@ -908,9 +908,11 @@ CURLcode Curl_is_connected(struct Curl_easy *data,
connkeep(conn, "HTTP/3 default"); connkeep(conn, "HTTP/3 default");
return CURLE_OK; return CURLE_OK;
} }
if(result) if(result) {
conn->tempsock[i] = CURL_SOCKET_BAD;
error = SOCKERRNO; error = SOCKERRNO;
} }
}
else else
#endif #endif
{ {

View File

@ -360,6 +360,8 @@ static CURLcode process_ingress(struct Curl_easy *data, int sockfd,
uint8_t *buf = (uint8_t *)data->state.buffer; uint8_t *buf = (uint8_t *)data->state.buffer;
size_t bufsize = data->set.buffer_size; size_t bufsize = data->set.buffer_size;
DEBUGASSERT(qs->conn);
/* in case the timeout expired */ /* in case the timeout expired */
quiche_conn_on_timeout(qs->conn); quiche_conn_on_timeout(qs->conn);