mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Coverity: Initialize msg buffer.
msg_flags was not being initialized and would have been passed to
sendmsg with a random value.
(cherry picked from commit a31ac8fc32)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user