]> git.ipfire.org Git - thirdparty/bind9.git/commit
Use sock->nchildren instead of mgr->nworkers when initializing NM
authorOndřej Surý <ondrej@isc.org>
Thu, 3 Dec 2020 16:58:10 +0000 (17:58 +0100)
committerOndřej Surý <ondrej@sury.org>
Wed, 9 Dec 2020 09:46:16 +0000 (10:46 +0100)
commitbb9b55dfba25d6b36e683da9602d0522b6cc4700
tree5798bbb4a8d5e80a76e025e9f9bc8b3fb6cd3bd7
parent857704b87908a0fcce49af467e3b236d2cded227
Use sock->nchildren instead of mgr->nworkers when initializing NM

On Windows, we were limiting the number of listening children to just 1,
but we were then iterating on mgr->nworkers.  That lead to scheduling
more async_*listen() than actually allocated and out-of-bound read-write
operation on the heap.

(cherry picked from commit 87c5867202935c59dfe66321238275ba4a953b53)
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tcpdns.c
lib/isc/netmgr/udp.c
lib/isc/netmgr/uv-compat.c