From 6ea091a04aa521bea24fba12c1b29290abcf6e96 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Thu, 9 Jun 2011 19:31:25 -0500 Subject: Bugfix 7153: Initialize buffer before reading into it --- src/cli_new.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/cli_new.c b/src/cli_new.c index f01d2a4..863f6a1 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -2154,6 +2154,7 @@ system_out(char *cmd, const char *prepend_msg, boolean eloc) if (sret == 1) { /* ready for read */ char buf[128]; + memset(buf,'\0',128); char *out = buf; ssize_t count = read(pfd[0], buf, 128); if (count <= 0) { -- cgit v1.2.3