Coverity: Initialize msg buffer.

msg_flags was not being initialized and would have been passed to
sendmsg with a random value.
This commit is contained in:
Richard W.M. Jones
2011-08-23 19:29:46 +01:00
parent c38cb92ec4
commit a31ac8fc32

View File

@@ -71,6 +71,7 @@ receive_stdout (int s)
}
/* Don't specify a source */
memset (&msg, 0, sizeof msg);
msg.msg_name = NULL;
msg.msg_namelen = 0;
@@ -118,6 +119,7 @@ send_stdout (int s)
char buf[1];
/* Don't specify a destination */
memset (&msg, 0, sizeof msg);
msg.msg_name = NULL;
msg.msg_namelen = 0;