From a31ac8fc32297cc9185fd20a5578d2bc81cc1bce Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Aug 2011 19:29:46 +0100 Subject: [PATCH] Coverity: Initialize msg buffer. msg_flags was not being initialized and would have been passed to sendmsg with a random value. --- fish/rc.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 1.8.3.1