Commit fcc2a57e authored by Mark Andrews's avatar Mark Andrews

2306. [bug] Remove potential race from lib/dns/resolver.c.

                        [RT #17470]
parent fcdafc1e
2306. [bug] Remove potential race from lib/dns/resolver.c.
[RT #17470]
2305. [security] inet_network() buffer overflow. CVE-2008-0122.
2304. [bug] Check returns from all dns_rdata_tostruct() calls.
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: resolver.c,v 1.356 2008/01/15 01:47:17 marka Exp $ */
/* $Id: resolver.c,v 1.357 2008/01/15 12:12:19 marka Exp $ */
/*! \file */
......@@ -6793,6 +6793,7 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
isc_event_t *event;
unsigned int count = 0;
unsigned int spillat;
unsigned int spillatmin;
UNUSED(forwarders);
......@@ -6823,6 +6824,7 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
LOCK(&res->lock);
spillat = res->spillat;
spillatmin = res->spillatmin;
UNLOCK(&res->lock);
LOCK(&res->buckets[bucketnum].lock);
......@@ -6856,7 +6858,8 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
count++;
}
}
if (count >= res->spillatmin && res->spillatmin != 0) {
if (count >= spillatmin && spillatmin != 0) {
INSIST(fctx != NULL);
if (count >= spillat)
fctx->spilled = ISC_TRUE;
if (fctx->spilled) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment