summaryrefslogtreecommitdiffstats
path: root/fish
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-08-23 19:29:46 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-08-23 19:29:46 +0100
commita31ac8fc32297cc9185fd20a5578d2bc81cc1bce (patch)
tree718e51d180342354f2749888b4616f0ad089ec74 /fish
parentc38cb92ec478c4dca83e4d38963720f463d52314 (diff)
downloadlibguestfs-a31ac8fc32297cc9185fd20a5578d2bc81cc1bce.tar.gz
libguestfs-a31ac8fc32297cc9185fd20a5578d2bc81cc1bce.tar.xz
libguestfs-a31ac8fc32297cc9185fd20a5578d2bc81cc1bce.zip
Coverity: Initialize msg buffer.
msg_flags was not being initialized and would have been passed to sendmsg with a random value.
Diffstat (limited to 'fish')
-rw-r--r--fish/rc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fish/rc.c b/fish/rc.c
index 721c6133..1744c416 100644
--- a/fish/rc.c
+++ b/fish/rc.c
@@ -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;