]> git.ipfire.org Git - thirdparty/squid.git/commit
Possible bug 3020 fix: Segmentation fault: nameservers[vc->ns].vc = NULL
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 1 Sep 2010 00:08:35 +0000 (18:08 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Wed, 1 Sep 2010 00:08:35 +0000 (18:08 -0600)
commitdd3fb890dc9bcb8d11d7cdcebcdd2c1ffa8628a0
tree35448e0710a364ed74a7e8a3f325a6278f6e6283
parente10272fcefdf98051e2f2d79c9121df5343299d7
Possible bug 3020 fix: Segmentation fault: nameservers[vc->ns].vc = NULL

Prevent idnsVCClosed segfaults during shutdown or reconfiguration (at least).

idnsShutdown() schedules comm_close and then frees nameservers[] by
calling idnsFreeNameservers. The closing handler tried to access freed
nameservers[]. The patch prevents access to the freed nameservers[]
array in idnsVCClosed and other functions.

TODO: Nameservers[] array management should be rewritten. The array
should not be freed while there are nameservers using it. It should be
freed when the last entry is gone.

From: 3p1-rock r9583
src/dns_internal.cc