mirror of
https://github.com/curl/curl.git
synced 2026-05-30 09:07:33 +03:00
vquic: do_sendmsg full init
When passing a `msg_ctrl` to sendmsg() as part of GSO handling, zero the complete array. This fixes any false positives by valgrind that complain about uninitialised memory, even though the kernel only ever accesses the first two bytes. Reported-by: Aleksei Bavshin Fixes #19714 Closes #19715
This commit is contained in:
parent
9bb5c0578b
commit
a9e7a027ed
1 changed files with 1 additions and 0 deletions
|
|
@ -145,6 +145,7 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
|
|||
if(pktlen > gsolen) {
|
||||
/* Only set this, when we need it. macOS, for example,
|
||||
* does not seem to like a msg_control of length 0. */
|
||||
memset(msg_ctrl, 0, sizeof(msg_ctrl));
|
||||
msg.msg_control = msg_ctrl;
|
||||
assert(sizeof(msg_ctrl) >= CMSG_SPACE(sizeof(int)));
|
||||
msg.msg_controllen = CMSG_SPACE(sizeof(int));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue