Cloning a name shouldn't copy the dynamic or

readonly attributes.
This commit is contained in:
Bob Halley 1999-10-12 20:38:30 +00:00
parent 86ff74ccf6
commit fff9a37a03

View file

@ -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,