vcl: zero out cmsg for recvmsg API 46/39246/2
authorSteven Luong <sluong@cisco.com>
Wed, 19 Jul 2023 06:25:15 +0000 (23:25 -0700)
committersteven luong <sluong@cisco.com>
Wed, 19 Jul 2023 06:37:29 +0000 (06:37 +0000)
commit2da272e3daf7d51dce2fcfea02d870427c3de970
tree4a10246351916a74a4e92483551c3b6688f5031f
parent0e1fe7ba86ccb0ab43a9a7452fe601abc23f16ce
vcl: zero out cmsg for recvmsg API

When msg->msg_controllen is set in recvmsg, the caller wants to receive
additional information about the messages. However, they might not
always be available. In that case, we should clear cmsg since
the caller uses CMSG_NXTHDR which might access uninitialized fields in
cmsg.

Type: fix

Change-Id: Ifdf9634bfcb1427f7ae3812014a46bfd7f4bc473
Signed-off-by: Steven Luong <sluong@cisco.com>
src/vcl/ldp.c