From: Richard W.M. Jones Date: Tue, 23 Aug 2011 18:29:46 +0000 (+0100) Subject: Coverity: Initialize msg buffer. X-Git-Tag: 1.13.7~3 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=a31ac8fc32297cc9185fd20a5578d2bc81cc1bce;p=libguestfs.git Coverity: Initialize msg buffer. msg_flags was not being initialized and would have been passed to sendmsg with a random value. --- diff --git a/fish/rc.c b/fish/rc.c index 721c613..1744c41 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;