summaryrefslogtreecommitdiffstats
path: root/web/attachments/41358-check_snmp.c.diff
blob: c5d28be5405005e4d0c77ca5d6cf104965db94ba (plain)
1
2
3
4
5
6
7
8
9
10
--- check_snmp.c.orig   2002-11-16 06:06:02.000000000 +0100
+++ check_snmp.c        2003-02-03 11:12:38.000000000 +0100
@@ -319,6 +319,7 @@
                    eval_method[i] & WARN_EQ ||
                    eval_method[i] & WARN_NE) {
                        p2 = strpbrk (p2, "0123456789");
+                       if (p2 == NULL) terminate (STATE_UNKNOWN,"No valid data returned");
                        response_value[i] = strtoul (p2, NULL, 10);
                        iresult = check_num (i);
                        asprintf (&show, "%lu", response_value[i]);