Re: [Nagios-devel] SIGSEGV in check.c on Solaris when plugin output

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] SIGSEGV in check.c on Solaris when plugin output

Post by Guest »

[email protected] wrote:
>
> Hi list,
>
> nagios dumps core with SIGSEV on Solaris 10 when a plugin does not print
> any output.
> Using gdb I found it happening in line 803 of base/checks.c, where
> checkresult_dbuf.buf is 0x0 on empty plugin output.
>
> Versions:
> - nagios-3.0.3 and nagios-cvs (as of 24. Sept 2008)
> - Solaris 10 x86
> - both Sun Studio 11 and gcc
>
> I tried a fix just in place by inserting a NULL pointer check just
> before the fprintf in line 803 ... maybe there is a more elegant solution.
>
> On linux, glibc seems to handel this problem in printf("output=%s",
> NULL) by returning the string "(null)".
>
>
> Regards,
> Torsten
> ===

Thanks! Patch will be in CVS shortly.


- Ethan Galstad





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