[Nagiosplug-devel] [ nagiosplug-Bugs-1578214 ] check_procs from crashes on Itanium2 SLES10
SourceForge.net
noreply at sourceforge.net
Mon Oct 16 16:23:48 CEST 2006
Bugs item #1578214, was opened at 2006-10-16 16:23
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1578214&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: CVS
Status: Open
Resolution: None
Priority: 5
Submitted By: wszenajch (wszenajch)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_procs from crashes on Itanium2 SLES10
Initial Comment:
check_procs from HEAD-20061015 build crashes on
Itanium2 SLES10.
Line192: procprog = base_name(procprog); of
check_procs.c is used incorrectly.
With this line as it is compilation gives the following
warning on all tested by me platforms: OpenSuSE 10.1
i386, SuSE 10.0 x86_64, SLES10 ia64, AIX 5.2:
check_procs.c: In function `main':
check_procs.c:192: warning: assignment makes pointer
from integer without a cast
but crashes only on Itanium2 platform.
To fix problem comment out line:
procprog = base_name(procprog);
or use construction from 1.4.3 plugins (which was
probably not active):
main ...
...
char *temp_string;
...
temp_string = strdup(procprog);
procprog = basename(temp_string);
According to man 3 basename:
"Both dirname() and basename() may modify the
contents of path, so copies should be passed to
these functions. Furthermore, dirname() and basename()
may return pointers to statically allocated memory whi
ch may be overwritten by subsequent calls."
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1578214&group_id=29880
More information about the Devel
mailing list