From 6317f8e685dd9063a28bf53a16513cbfc7a50516 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Thu, 6 Oct 2011 10:43:30 -0500 Subject: [PATCH] redhat analysis: ps/parser --- ps/parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ps/parser.c b/ps/parser.c index 3e8f8875..70d94fe1 100644 --- a/ps/parser.c +++ b/ps/parser.c @@ -119,6 +119,7 @@ static const char *parse_gid(char *str, sel_union *ret){ static const char *parse_cmd(char *str, sel_union *ret){ strncpy(ret->cmd, str, sizeof ret->cmd); // strncpy pads to end + ret->cmd[sizeof(ret->cmd)-1] = '\0'; // but let's be safe return 0; }