From: Stefan Eissing Date: Thu, 27 Mar 2025 13:55:41 +0000 (+0100) Subject: vquic: obey IOV_MAX X-Git-Tag: curl-8_13_0~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a910f5ba6a97a84a37a610c04d888336786d1128;p=thirdparty%2Fcurl.git vquic: obey IOV_MAX When using `recvmmsg()`, check `IOV_MAX` for limits to the iovec array passed. Reported-by: Teh Kok How Fixes #16846 Closes #16849 --- diff --git a/lib/vquic/vquic.c b/lib/vquic/vquic.c index 1e7a258b61..eb08ce7a22 100644 --- a/lib/vquic/vquic.c +++ b/lib/vquic/vquic.c @@ -379,7 +379,7 @@ static CURLcode recvmmsg_packets(struct Curl_cfilter *cf, total_nread = 0; while(pkts < max_pkts) { - n = (int)CURLMIN(MMSG_NUM, max_pkts); + n = (int)CURLMIN(CURLMIN(MMSG_NUM, IOV_MAX), max_pkts); memset(&mmsg, 0, sizeof(mmsg)); for(i = 0; i < n; ++i) { msg_iov[i].iov_base = bufs[i];