]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
quiche: fix crash when failing to connect
authorDaniel Stenberg <daniel@haxx.se>
Mon, 8 Mar 2021 10:28:41 +0000 (11:28 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 8 Mar 2021 16:14:13 +0000 (17:14 +0100)
Reported-by: ウさん
Fixes #6664
Closes #6701

lib/connect.c
lib/vquic/quiche.c

index 6c94643604665430e59f56f2b3d4b890de3946c4..f9dd415ba45d108501c65e2c3e6f5d9efbe28b05 100644 (file)
@@ -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
index 9b476cbd2a5415b95ca622f42af07fee2a1a31c3..a3870749b59fbe86c3000831928dbc98afaec710 100644 (file)
@@ -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);