mirror of
https://github.com/curl/curl.git
synced 2026-07-27 09:47:16 +03:00
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
This commit is contained in:
parent
0c1ad21f97
commit
a910f5ba6a
1 changed files with 1 additions and 1 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue