[nagiosplug] check_snmp: Allocate space for the new -Le option

"Nagios Plugin Development" <[email protected]> Sun, 18 Aug 2013 17:10:17 +0000
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
 Module: nagiosplug
 Branch: master
 Commit: e6bcf116537883ea856b6032f1375e94483963f7
 Author: Holger Weiss <[email protected]>
   Date: Sun Aug 18 19:08:04 2013 +0200
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=e6bcf11

check_snmp: Allocate space for the new -Le option

Closes #41.

---

 plugins/check_snmp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index b79c020..3e8a9cf 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -274,8 +274,8 @@ main (int argc, char **argv)
 		snmpcmd = strdup (PATH_TO_SNMPGET);
 	}
 
-	/* 9 arguments to pass before authpriv options + 1 for host and numoids. Add one for terminating NULL */
-	command_line = calloc (9 + numauthpriv + 1 + numoids + 1, sizeof (char *));
+	/* 10 arguments to pass before authpriv options + 1 for host and numoids. Add one for terminating NULL */
+	command_line = calloc (10 + numauthpriv + 1 + numoids + 1, sizeof (char *));
 	command_line[0] = snmpcmd;
 	command_line[1] = strdup ("-Le");
 	command_line[2] = strdup ("-t");


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk