summaryrefslogtreecommitdiffstats
path: root/lib/tests
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-11-05 16:15:59 (GMT)
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-11-05 16:15:59 (GMT)
commit3011838fe9796f24ad3d197057890042b527ef9d (patch)
treef096a06be5c65e49c46ee0c85c591cda08383a50 /lib/tests
parentf3e0909e124674db029dbfbfb4ae80de94a5d89f (diff)
downloadmonitoring-plugins-3011838fe9796f24ad3d197057890042b527ef9d.tar.gz
Fix calculation of extra-opts parameters.
By reading the current list instead of the additional one when counting parameters, extra-opts calculation was allocating insuficient space for the final array if later sections contained more arguments than the sum of all previously parsed sections. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2069 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'lib/tests')
-rw-r--r--lib/tests/test_opts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tests/test_opts.c b/lib/tests/test_opts.c
index b9696df..6d6167e 100644
--- a/lib/tests/test_opts.c
+++ b/lib/tests/test_opts.c
@@ -276,7 +276,7 @@ main (int argc, char **argv)
276 argv_test=(char **)malloc(4*sizeof(char **)); 276 argv_test=(char **)malloc(4*sizeof(char **));
277 argv_test[0] = "check_tcp"; 277 argv_test[0] = "check_tcp";
278 argv_test[1] = "--extra-opts"; 278 argv_test[1] = "--extra-opts";
279 argv_test[2] = "--extra-opts=tcp_long_lines@plugins.ini"; 279 argv_test[2] = "--extra-opts=tcp_long_lines";
280 argv_test[3] = NULL; 280 argv_test[3] = NULL;
281 argc_test=3; 281 argc_test=3;
282 argv_known=(char **)realloc(argv_known, 7*sizeof(char **)); 282 argv_known=(char **)realloc(argv_known, 7*sizeof(char **));