diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-03-11 22:34:11 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-03-11 22:34:11 +0000 |
commit | 8b2381c97634804bad7aa0b48345a9e1216b5512 (patch) | |
tree | 5e43a663ad7132c5eb4ec71f0b5832b2de5385b6 /plugins/negate.c | |
parent | 7283211f00a3a89956d9dfc4a851dc1aaa7a1cf3 (diff) | |
download | monitoring-plugins-8b2381c97634804bad7aa0b48345a9e1216b5512.tar.gz |
Fixed reading too many argv parameters and changed to asprintf
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@397 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/negate.c')
-rw-r--r-- | plugins/negate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/negate.c b/plugins/negate.c index e10c78df..1603342b 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]); } |