summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2003-03-11 22:34:11 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2003-03-11 22:34:11 (GMT)
commit46892f0d7c1c196e09ebc59478b50b44e2ac0ee5 (patch)
treedcecd2777e91f25e8e2de1dd0bb9592f8ef1bc3b /plugins
parentceb3688014ecbf8b4eccc12204ec4a0952987992 (diff)
downloadmonitoring-plugins-46892f0d7c1c196e09ebc59478b50b44e2ac0ee5.tar.gz
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
Diffstat (limited to 'plugins')
-rw-r--r--plugins/negate.c4
1 files changed, 2 insertions, 2 deletions
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)
259 } 259 }
260 } 260 }
261 261
262 command_line = strscpy (command_line, argv[optind]); 262 asprintf (&command_line, "%s", argv[optind]);
263 for (c = optind+1; c <= argc; c++) { 263 for (c = optind+1; c < argc; c++) {
264 asprintf (&command_line, "%s %s", command_line, argv[c]); 264 asprintf (&command_line, "%s %s", command_line, argv[c]);
265 } 265 }
266 266