From fff9a37a0355e4181b3132370a173d1dbb5a0f3c Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Tue, 12 Oct 1999 20:38:30 +0000 Subject: [PATCH] Cloning a name shouldn't copy the dynamic or readonly attributes. --- lib/dns/name.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dns/name.c b/lib/dns/name.c index 11f67b4b6f..08823bc996 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -911,7 +911,8 @@ dns_name_clone(dns_name_t *source, dns_name_t *target) { target->ndata = source->ndata; target->length = source->length; target->labels = source->labels; - target->attributes = source->attributes; + target->attributes = source->attributes & + ~(DNS_NAMEATTR_READONLY|DNS_NAMEATTR_DYNAMIC); if (target->offsets != NULL && source->labels > 0) { if (source->offsets != NULL) memcpy(target->offsets, source->offsets,