From 0583946ff70d73b5da579db1d81c9c374adf2cc3 Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Thu, 7 Feb 2019 14:25:14 +0100 Subject: [PATCH] auth: fix dot stripping in setContent() --- pdns/dnsrecords.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index c29f1794d..d89419e23 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -39,7 +39,7 @@ void DNSResourceRecord::setContent(const string &cont) { case QType::DNAME: case QType::NS: case QType::PTR: - if(!content.empty()) + if (content.size() >= 2 && *(content.rbegin()) == '.') boost::erase_tail(content, 1); } } -- 2.40.0