[Nagiosplug-devel] [ nagiosplug-Bugs-1578214 ] check_procs from crashes on Itanium2 SLES10
SourceForge.net
noreply at sourceforge.net
Wed Jan 17 06:34:28 CET 2007
Bugs item #1578214, was opened at 2006-10-16 10:23
Message generated for change (Comment added) made by dermoth
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: Closed
>Resolution: Fixed
Priority: 5
Private: No
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."
----------------------------------------------------------------------
>Comment By: Thomas Guyot (dermoth)
Date: 2007-01-17 00:34
Message:
Logged In: YES
user_id=375623
Originator: NO
This was fixed in CVS using the strcpy function (1630970).
----------------------------------------------------------------------
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