]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
quiche: fix verbose message when ip quadruple cannot be obtained.
authorStefan Eissing <stefan@eissing.org>
Thu, 25 Sep 2025 10:46:09 +0000 (12:46 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 25 Sep 2025 12:12:11 +0000 (14:12 +0200)
Reported in Joshua's sarif data

Closes #18726

lib/vquic/curl_quiche.c

index 523f04e33bd99a4bb60ef7dcd4a46171a307823a..e096c63fe98f8d2738ac1ad037c0b755a4b5dfd8 100644 (file)
@@ -1432,9 +1432,11 @@ out:
   if(result && result != CURLE_AGAIN) {
     struct ip_quadruple ip;
 
-    Curl_cf_socket_peek(cf->next, data, NULL, NULL, &ip);
-    infof(data, "connect to %s port %u failed: %s",
-          ip.remote_ip, ip.remote_port, curl_easy_strerror(result));
+    if(!Curl_cf_socket_peek(cf->next, data, NULL, NULL, &ip))
+      infof(data, "connect to %s port %u failed: %s",
+            ip.remote_ip, ip.remote_port, curl_easy_strerror(result));
+    else
+      infof(data, "connect failed: %s", curl_easy_strerror(result));
   }
 #endif
   return result;