diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-29 22:03:24 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-29 22:03:24 (GMT) |
commit | 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch) | |
tree | 1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/318264-check_snmp_max_oids.patch | |
download | site-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz |
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts,
and configuration files.
Diffstat (limited to 'web/attachments/318264-check_snmp_max_oids.patch')
-rw-r--r-- | web/attachments/318264-check_snmp_max_oids.patch | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/web/attachments/318264-check_snmp_max_oids.patch b/web/attachments/318264-check_snmp_max_oids.patch new file mode 100644 index 0000000..c2a3217 --- /dev/null +++ b/web/attachments/318264-check_snmp_max_oids.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c | ||
2 | index 3dc52df..41a5ea1 100644 | ||
3 | --- a/plugins/check_snmp.c | ||
4 | +++ b/plugins/check_snmp.c | ||
5 | @@ -527,9 +527,8 @@ process_arguments (int argc, char **argv) | ||
6 | needmibs = TRUE; | ||
7 | } | ||
8 | oids = calloc(MAX_OIDS, sizeof (char *)); | ||
9 | - for (ptr = strtok(optarg, ", "); ptr != NULL; ptr = strtok(NULL, ", ")) { | ||
10 | + for (ptr = strtok(optarg, ", "); ptr != NULL && j < MAX_OIDS; ptr = strtok(NULL, ", "), j++) { | ||
11 | oids[j] = strdup(ptr); | ||
12 | - j++; | ||
13 | } | ||
14 | numoids = j; | ||
15 | if (c == 'E' || c == 'e') { | ||