diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-07-03 16:49:14 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-07-03 16:49:14 +0000 |
commit | de2773d48510f3ef7908e341446bc2b72c0b7969 (patch) | |
tree | 4a163c6a9cef7d33210f067c13a73c84db9455d2 | |
parent | 1ca485eb821cd388270a996318e3ac9a8c9f9728 (diff) | |
download | monitoring-plugins-de2773d48510f3ef7908e341446bc2b72c0b7969.tar.gz |
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
-rw-r--r-- | plugins/check_procs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/check_procs.c b/plugins/check_procs.c index 737a87b1..ccf0891d 100644 --- a/plugins/check_procs.c +++ b/plugins/check_procs.c @@ -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; |