From e3c06ccc665dde20f278fe80852810349492122d Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Mon, 8 Sep 2025 15:29:29 +0200 Subject: [PATCH] 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 --- lib/vquic/vquic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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;