Commit 62305d91 authored by Bob Halley's avatar Bob Halley
Browse files

allow owner_name to be empty

parent 51ae92e4
......@@ -157,10 +157,19 @@ dns_rdataset_totext(dns_rdataset_t *rdataset,
do {
if (first) {
common_start = target->used;
result = dns_name_totext(owner_name, omit_final_dot,
target);
if (result != DNS_R_SUCCESS)
return (result);
/*
* The caller might want to give us an empty owner
* name (e.g. if they are outputting into a master
* file and this rdataset has the same name as the
* previous one.)
*/
if (dns_name_countlabels(owner_name) != 0) {
result = dns_name_totext(owner_name,
omit_final_dot,
target);
if (result != DNS_R_SUCCESS)
return (result);
}
common_length = target->used - common_start;
common = (char *)target->base + common_start;
if (common_length >= 16) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment