extract_name_no_compression: strip trailing dot.
diff --git a/src/dnssec.c b/src/dnssec.c
index c9f80ee..1784301 100644
--- a/src/dnssec.c
+++ b/src/dnssec.c
@@ -64,8 +64,10 @@
}
*buf++ = '.';
}
+ // Remove trailing dot (if any)
+ if (rr != start)
+ *(--buf) = 0;
rr++;
- *buf = 0;
if (rr == end)
return 0;
return rr-start;
@@ -200,7 +202,7 @@
alg->vtbl->begin_data(alg);
alg->vtbl->add_data(alg, sigrdata, 18);
- alg->vtbl->add_data(alg, signer_name, strlen(signer_name)-1); /* remove trailing dot */
+ alg->vtbl->add_data(alg, signer_name, strlen(signer_name));
for (i = 0; i < rrsetidx; ++i)
{
int rdlen;