]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
vquic: replace assert
authorStefan Eissing <stefan@eissing.org>
Mon, 8 Sep 2025 13:29:29 +0000 (15:29 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 8 Sep 2025 14:05:27 +0000 (16:05 +0200)
Replace the hard assert in case not all data is send on UDP
(which should never happen), with an error return.

Closes #18495

lib/vquic/vquic.c

index f3a02f63ae69cfe999a9ce9a63763de088d04b7e..647450a29ba4626618d049c55e172fef640bab60 100644 (file)
@@ -186,8 +186,9 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
       return CURLE_SEND_ERROR;
     }
   }
-  else {
-    assert(pktlen == (size_t)sent);
+  else if(pktlen != (size_t)sent) {
+    failf(data, "sendmsg() sent only %zd/%zu bytes", sent, pktlen);
+    return CURLE_SEND_ERROR;
   }
 #else
   ssize_t sent;