summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-03-08 11:28:41 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-03-08 11:28:41 +0100
commit27af6fefe662b36827f70cf1a041ac350c8b39b2 (patch)
tree878fc076f75717afd3a969239f479010834fe849
parentb899cb08c66055cb798d8109de0e19e371fe440a (diff)
downloadcurl-bagder/quiche-crash.tar.gz
quiche: fix crash when failing to connectbagder/quiche-crash
Reported-by: ウさん Fixes #6664
-rw-r--r--lib/connect.c4
-rw-r--r--lib/vquic/quiche.c2
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);