Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 19ff2ba4e9513c692f03f152b5fcb7f0 > files > 31

bind-9.3.6-25.P1.el5_11.11.src.rpm

diff -up bind-9.3.6-P1/lib/dns/resolver.c.CVE-2012-3817 bind-9.3.6-P1/lib/dns/resolver.c
--- bind-9.3.6-P1/lib/dns/resolver.c.CVE-2012-3817	2012-07-25 14:05:08.893144851 +0200
+++ bind-9.3.6-P1/lib/dns/resolver.c	2012-07-25 14:05:28.524531571 +0200
@@ -6974,6 +6974,7 @@ dns_resolver_addbadcache(dns_resolver_t
 		}
 		bad->type = type;
 		bad->hashval = hashval;
+		bad->expire = *expire;
 		isc_buffer_init(&buffer, bad + 1, name->length);
 		dns_name_init(&bad->name, NULL);
 		dns_name_copy(name, &bad->name, &buffer);
@@ -6985,8 +6986,8 @@ dns_resolver_addbadcache(dns_resolver_t
 		if (resolver->badcount < resolver->badhash * 2 &&
 		    resolver->badhash > DNS_BADCACHE_SIZE)
 			resizehash(resolver, &now, ISC_FALSE);
-	}
-	bad->expire = *expire;
+	} else
+		bad->expire = *expire;
 cleanup:
 	UNLOCK(&resolver->lock);
 }