Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 80d1f2870a6a8b31a729c8f800bc739c > files > 23

bind97-9.7.0-21.P2.el5_11.4.src.rpm

diff -up bind-9.7.0-P2/lib/dns/resolver.c.CVE-2012-3817 bind-9.7.0-P2/lib/dns/resolver.c
--- bind-9.7.0-P2/lib/dns/resolver.c.CVE-2012-3817	2012-07-25 13:37:37.295807242 +0200
+++ bind-9.7.0-P2/lib/dns/resolver.c	2012-07-25 13:38:11.608354146 +0200
@@ -8389,6 +8389,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);
@@ -8400,8 +8401,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);
 }