mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-11 09:40:05 -04:00
Fixed seg fault on some Sol 7/8 servers (Patch 764745 - Alexander Matey)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@585 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
1ca485eb82
commit
de2773d485
1 changed files with 5 additions and 1 deletions
|
|
@ -204,11 +204,15 @@ main (int argc, char **argv)
|
|||
/* Zombie processes do not give a procprog command */
|
||||
if ( cols == 6 && strstr(procstat, zombie) ) {
|
||||
cols = 7;
|
||||
/* Set some value for procargs for the strip command further below
|
||||
Seen to be a problem on some Solaris 7 and 8 systems */
|
||||
input_buffer[pos] = '\n';
|
||||
input_buffer[pos+1] = 0x0;
|
||||
}
|
||||
if ( cols >= 7 ) {
|
||||
resultsum = 0;
|
||||
asprintf (&procargs, "%s", input_buffer + pos);
|
||||
strip (procargs);
|
||||
strip (procargs);
|
||||
|
||||
if ((options & STAT) && (strstr (statopts, procstat)))
|
||||
resultsum |= STAT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue