From af14cb60f7af67472cf7494eb5d0395cb7bd068e Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 12 Nov 2011 09:04:51 +0100 Subject: [PATCH] wmc: Increate allocated size to match \0 (Coverity). --- tools/wmc/wmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/wmc/wmc.c b/tools/wmc/wmc.c index 837cfa60321..c9ad9c4aa3e 100644 --- a/tools/wmc/wmc.c +++ b/tools/wmc/wmc.c @@ -164,7 +164,7 @@ int main(int argc,char *argv[]) /* First rebuild the commandline to put in destination */ /* Could be done through env[], but not all OS-es support it */ - cmdlen = 4; /* for "wmc " */ + cmdlen = 5; /* for "wmc " and \0 */ for(i = 1; i < argc; i++) cmdlen += strlen(argv[i]) + 1; cmdline = xmalloc(cmdlen);