diff options
author | adrb <github.adrb@adrb.pl> | 2022-07-24 16:44:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-24 16:44:16 +0200 |
commit | 9f2a9ca3d72023ff9b5707d1872c54d65edc9017 (patch) | |
tree | 3eae954ad8a0dd523c1ecde325258550b915ba2b /plugins/check_snmp.c | |
parent | 65fc7064295ac70d1388fa4db4d4d2cddd531e24 (diff) | |
download | monitoring-plugins-9f2a9ca3d72023ff9b5707d1872c54d65edc9017.tar.gz |
check_snmp: Segfault if number of processed lines is greater than number of thresholds
Segfault at line 489 if number of processed lines is greater than number (#1589) of thresholds
Co-authored-by: Lorenz <12514511+RincewindsHat@users.noreply.github.com>
Diffstat (limited to 'plugins/check_snmp.c')
-rw-r--r-- | plugins/check_snmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index bd13e579..2601ccd8 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -376,7 +376,7 @@ main (int argc, char **argv) } } - for (line=0, i=0; line < chld_out.lines; line++, i++) { + for (line=0, i=0; line < chld_out.lines && i < numoids ; line++, i++) { if(calculate_rate) conv = "%.10g"; else |