summaryrefslogtreecommitdiffstats
path: root/plugins/check_snmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_snmp.c')
-rw-r--r--plugins/check_snmp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 3dc52dff..41a5ea1a 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -527,9 +527,8 @@ process_arguments (int argc, char **argv)
527 needmibs = TRUE; 527 needmibs = TRUE;
528 } 528 }
529 oids = calloc(MAX_OIDS, sizeof (char *)); 529 oids = calloc(MAX_OIDS, sizeof (char *));
530 for (ptr = strtok(optarg, ", "); ptr != NULL; ptr = strtok(NULL, ", ")) { 530 for (ptr = strtok(optarg, ", "); ptr != NULL && j < MAX_OIDS; ptr = strtok(NULL, ", "), j++) {
531 oids[j] = strdup(ptr); 531 oids[j] = strdup(ptr);
532 j++;
533 } 532 }
534 numoids = j; 533 numoids = j;
535 if (c == 'E' || c == 'e') { 534 if (c == 'E' || c == 'e') {