check_dns segfaults when nslookup returns empty answer

Marc Powell marc at ena.com
Tue Dec 9 21:22:21 CET 2003



> -----Original Message-----
> From: Michel Blomgren [mailto:michel at sentinix.org]
> Sent: Tuesday, December 09, 2003 12:58 PM
> To: nagios-devel at lists.sourceforge.net
> Subject: [Nagios-devel] check_dns segfaults when nslookup returns
empty
> answer
> 
> Hi!
> 
> In nagios-plugins-1.3.1:
> 
> check_dns seems to segfault when nslookup returns an empty answer,
e.g.
> when
> querrying a non-resolvable hostname.  I know, querrying a nameserver
using
> it's hostname is probably not what one want to do, but still, it
> segfaults.
> 
> root at sentinix:/usr/local/nagios/libexec$ ./check_dns -s non_existent
-H \
> a.root-servers.net
> Segmentation fault
> 
> nslookup directs it's error to stderr, but stdout is completely empty.
> 
> I can provide a patch for this, unless of course, anyone hasn't
already
> thought about this??!


I saw similar behavior when querying a non-recursive server for a domain
it wasn't authoritative for. The CVS version appears to handle
exceptions like that better. Try that and see if it works for you as
well.

--
MArc 



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/




More information about the Developers mailing list