diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-03-08 11:28:41 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-03-08 17:14:13 +0100 |
commit | ec549aa6254b4f1b8bd612f973a5c44d20a4d20b (patch) | |
tree | 878fc076f75717afd3a969239f479010834fe849 /lib | |
parent | b899cb08c66055cb798d8109de0e19e371fe440a (diff) | |
download | curl-ec549aa6254b4f1b8bd612f973a5c44d20a4d20b.tar.gz |
quiche: fix crash when failing to connect
Reported-by: ウさん
Fixes #6664
Closes #6701
Diffstat (limited to 'lib')
-rw-r--r-- | lib/connect.c | 4 | ||||
-rw-r--r-- | lib/vquic/quiche.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/connect.c b/lib/connect.c index 6c9464360..f9dd415ba 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -908,8 +908,10 @@ CURLcode Curl_is_connected(struct Curl_easy *data, connkeep(conn, "HTTP/3 default"); return CURLE_OK; } - if(result) + if(result) { + conn->tempsock[i] = CURL_SOCKET_BAD; error = SOCKERRNO; + } } else #endif diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c index 9b476cbd2..a3870749b 100644 --- a/lib/vquic/quiche.c +++ b/lib/vquic/quiche.c @@ -360,6 +360,8 @@ static CURLcode process_ingress(struct Curl_easy *data, int sockfd, uint8_t *buf = (uint8_t *)data->state.buffer; size_t bufsize = data->set.buffer_size; + DEBUGASSERT(qs->conn); + /* in case the timeout expired */ quiche_conn_on_timeout(qs->conn); |