mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-09 08:42:17 -04:00
Avoid core dump with null or invalid data (679400 - Mathieu Masseboeuf)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@285 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
1a1403e4b9
commit
3c6bec5c63
1 changed files with 2 additions and 0 deletions
|
|
@ -321,6 +321,8 @@ main (int argc, char **argv)
|
|||
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]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue