Page 1 of 1

[Nagios-devel] common/snprintf.c doesn't handle floating point (w/fix)

Posted: Sat Aug 24, 2002 10:11 pm
by Guest
Nagios 1.0b5 was seg-faulting on my Solaris 2.5.1 system, and I tracked it
down to common/snprintf.c not handling floating point. It was a call
from xsddefault_update_host_status() that first required floating
point. common/snprintf.c deals with a "%f" by writing "???????",
but ignoring the argument on the stack, and that's not sufficient.

The page
http://www.ijs.si/software/snprintf/
has a lot of information on snprintf(). The version there also
does not do floating point, but the page includes a reference
to the samba version at
http://samba.org/cgi-bin/cvsweb/samba/s ... snprintf.c
which has the same origin (Patrick Powell)
as the version included with nagios, but the samba version
has been enhanced for floating point.

I replaced the nagios snprintf.c with the samba version, and things
seem to be working as expected. So I'm suggesting that as a likely
fix.

Cheers! Thanks!

John
[email protected]





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]