diff --git a/CHANGES b/CHANGES index 84e8dc3581..3e1390f95a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1206. [bug] dns_name_downcase() enforce requirement that + target != NULL or name->buffer != NULL. + 1205. [func] lwres: probe the system to see what address families are currently in use. diff --git a/lib/dns/name.c b/lib/dns/name.c index 86fb4f5fa7..1a2545ab6e 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: name.c,v 1.133 2002/03/14 00:36:06 bwelling Exp $ */ +/* $Id: name.c,v 1.134 2002/05/28 03:39:46 marka Exp $ */ #include @@ -2075,7 +2075,8 @@ dns_name_downcase(dns_name_t *source, dns_name_t *name, isc_buffer_t *target) { ndata = source->ndata; } else { REQUIRE(BINDABLE(name)); - if (target == NULL && name->buffer != NULL) { + REQUIRE(target != NULL || name->buffer != NULL); + if (target == NULL) { target = name->buffer; isc_buffer_clear(name->buffer); }