[PATCH] udp: Provide dummy iov in udp_peek_addr() to avoid Coverity warning
udp_peek_addr() initialises struct msghdr without setting msg_iov,
leaving it implicitly NULL. Coverity flags this as FORWARD_NULL,
believing recvmsg() will dereference the NULL pointer.
In practice, msg_iovlen being zero means the kernel never touches
msg_iov, so the warning is a false positive. We now provide a
one-byte dummy iov to make msg_iov non-NULL, hence suppressing this
warning without changing the function's behaviour.
Signed-off-by: Jon Maloy
participants (1)
-
Jon Maloy