monitoring-plugins/plugins
Robin Sonefors 77eba26361 check_snmp: Don't thrash memory when using multiple label/unit argument
The memory allocation mixed up number of bytes with number of pointers,
meaning as soon as we'd reach (on 64 bit systems) the second argument,
we'd start writing it outside of our allocated memory.

Normally, this isn't too visible, but as soon as you (again, on my 64
bit system) reach argument number 8, you get a segfault. It is easily
reproducible with:
check_snmp -o '' -l '' -o '' -l '' -o '' -l '' -o '' -l '' \
           -o '' -l '' -o '' -l '' -o '' -l '' -o '' -l ''

This patch allocates the proper amount of memory, to fix the issue.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
2013-01-23 19:52:24 +01:00
..
t Merge remote-tracking branch 'github/tokkee/sh/check_dbi' 2012-07-04 23:50:48 +02:00
tests tests/check_http.t: Fix whitespace issues 2012-08-10 12:49:30 +02:00
check_apt.c Add newline after "Usage:" in --help 2010-04-22 08:57:14 -04:00
check_by_ssh.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_cluster.c Add newline after "Usage:" in --help 2010-04-22 08:57:14 -04:00
check_dbi.c check_dbi: Hint the user about cause when dbi init fails. 2012-06-06 15:06:44 +02:00
check_dig.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_disk.c Update plugins/check_disk.c 2012-09-25 17:45:12 +03:00
check_dns.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_dummy.c Add newline after "Usage:" in --help 2010-04-22 08:57:14 -04:00
check_fping.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_game.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_hpjd.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_http.c check_http: Update description of -C option 2012-08-10 13:07:44 +02:00
check_ide_smart.c Add newline after "Usage:" in --help 2010-04-22 08:57:14 -04:00
check_ldap.c unified ipv4/6 usage and help text 2012-11-28 11:03:11 +01:00
check_load.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_mrtg.c Add newline after "Usage:" in --help 2010-04-22 08:57:14 -04:00
check_mrtgtraf.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_mysql.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_mysql_query.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_nagios.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_nt.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_ntp.c check_ntp(_time): don't die on connect errors 2012-11-28 13:51:16 +01:00
check_ntp_peer.c unified ipv4/6 usage and help text 2012-11-28 11:03:11 +01:00
check_ntp_time.c check_ntp(_time): don't die on connect errors 2012-11-28 13:51:16 +01:00
check_nwstat.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_overcr.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_pgsql.c unified ipv4/6 usage and help text 2012-11-28 11:03:11 +01:00
check_ping.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_procs.c check_procs: Remove superfluous newline character 2012-11-14 20:53:47 +01:00
check_radius.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_real.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_smtp.c fixing bug in certificate experiation patch checking for bad warning threshold data 2012-08-10 13:03:00 +02:00
check_snmp.c check_snmp: Don't thrash memory when using multiple label/unit argument 2013-01-23 19:52:24 +01:00
check_ssh.c unified ipv4/6 usage and help text 2012-11-28 11:03:11 +01:00
check_swap.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_tcp.c fixing bug in certificate experiation patch checking for bad warning threshold data 2012-08-10 13:03:00 +02:00
check_time.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_ups.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
check_users.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
common.h Allow for configuring OpenSSL 2012-10-09 09:44:48 +02:00
Makefile.am Merge remote-tracking branch 'github/tokkee/sh/check_dbi' 2012-07-04 23:50:48 +02:00
negate.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
netutils.c Make socket alarm handler customisable (like c459ca07) 2009-03-24 21:40:06 -04:00
netutils.h applied patch that adds both critical and warning thresholds to certificate expiration checks of check_tcp, check_http, check_smtp 2012-06-25 12:05:16 +02:00
popen.c Removing CVS/SVN tags and replacing with git-based versioning 2008-11-23 05:38:47 +00:00
popen.h Removing CVS/SVN tags and replacing with git-based versioning 2008-11-23 05:38:47 +00:00
runcmd.c Removing CVS/SVN tags and replacing with git-based versioning 2008-11-23 05:38:47 +00:00
runcmd.h Removing CVS/SVN tags and replacing with git-based versioning 2008-11-23 05:38:47 +00:00
sslutils.c check_http: added test for warning thresholds 2012-06-25 12:53:47 +02:00
urlize.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
utils.c Die when asprintf fails 2012-06-29 13:39:11 +02:00
utils.h Die when asprintf fails 2012-06-29 13:39:11 +02:00