Comment 16 for bug 1314697

Revision history for this message
James Hunt (jamesodhunt) wrote :

A bit of debugging shows that the culprit is blockdata_expand() which is being called via blockdata_init(). The issue seems to be that blockdata_expand() is passed a parameter of zero. That function then mallocs zero bytes (successfully seemingly), the proceeds to overwrite data before the returned address resulting the the 2 fds being set to zero.

blockdata_expand() is passed zero since daemon->cachesize (aka dnsmasq_daemon->cachesize) is zero. This is confirmed by looking at syslog which shows:

May 8 21:56:54 utopic dnsmasq[10812]: started, version 2.70 cache disabled