[Nagiosplug-checkins] CVS: nagiosplug/plugins check_snmp.c,1.22,1.23
Ton Voon
tonvoon at users.sourceforge.net
Mon Feb 3 13:48:49 CET 2003
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv27523
Modified Files:
check_snmp.c
Log Message:
Avoid core dump with null or invalid data (679400 - Mathieu Masseboeuf)
Index: check_snmp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_snmp.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** check_snmp.c 17 Jan 2003 05:37:22 -0000 1.22
--- check_snmp.c 3 Feb 2003 21:43:18 -0000 1.23
***************
*** 322,325 ****
--- 322,327 ----
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);
More information about the Commits
mailing list