From: Stefan Eissing Date: Mon, 8 Sep 2025 13:29:29 +0000 (+0200) Subject: vquic: replace assert X-Git-Tag: curl-8_16_0~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3c06ccc665dde20f278fe80852810349492122d;p=thirdparty%2Fcurl.git vquic: replace assert Replace the hard assert in case not all data is send on UDP (which should never happen), with an error return. Closes #18495 --- diff --git a/lib/vquic/vquic.c b/lib/vquic/vquic.c index f3a02f63ae..647450a29b 100644 --- a/lib/vquic/vquic.c +++ b/lib/vquic/vquic.c @@ -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;