From: Kees Monshouwer Date: Thu, 7 Feb 2019 13:25:14 +0000 (+0100) Subject: auth: fix dot stripping in setContent() X-Git-Tag: auth-4.2.0-beta1~24^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0583946ff70d73b5da579db1d81c9c374adf2cc3;p=pdns auth: fix dot stripping in setContent() --- 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); } }