SIGSEGV in check.c on Solaris when plugin output is empty

Ethan Galstad nagios at nagios.org
Wed Oct 15 17:33:27 CEST 2008


thuebler at sachsendv.de 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 SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/




More information about the Developers mailing list