[Dnsmasq-discuss] Bug in DNSMasq

Simon Kelley simon at thekelleys.org.uk
Fri Aug 29 07:32:39 BST 2008


John C. Meuser wrote:
> I found a small bug in DNSMasq.  I'm using dnsmasq at my company for
> caching and resolving internal hosts.  One of the hosts is our
> webserver, which has a lot of domains, so its hosts line is quite long.
> I noticed that some of the hostnames weren't resolving, and through
> trial and error discovered that the problem was with any name beyond the
> 1024'th character in the hosts line (as I said, it has a LOT of hosts).
> 
> Very simple workaround was to split the line into two, because DNSMasq
> doesn't seem to care if you repeat IP addresses.  So it's not a huge
> bug, but I thought you might want to be aware of it.
> 

Let this be a lesson to all C programmers out there. Fixed length 
buffers (even generous ones) will come back and bite you in the end.

Thanks for the report: I'll re-write the relevant code.

Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list