From 46892f0d7c1c196e09ebc59478b50b44e2ac0ee5 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Tue, 11 Mar 2003 22:34:11 +0000 Subject: Fixed reading too many argv parameters and changed to asprintf git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/branches/release-1.3.0@397 f882894a-f735-0410-b71e-b25c423dba1c diff --git a/plugins/negate.c b/plugins/negate.c index e10c78d..1603342 100644 --- a/plugins/negate.c +++ b/plugins/negate.c @@ -259,8 +259,8 @@ process_arguments (int argc, char **argv) } } - command_line = strscpy (command_line, argv[optind]); - for (c = optind+1; c <= argc; c++) { + asprintf (&command_line, "%s", argv[optind]); + for (c = optind+1; c < argc; c++) { asprintf (&command_line, "%s %s", command_line, argv[c]); } -- cgit v0.10-9-g596f