From 67244954d1f212a075880777eb2afd4f56b10c63 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() (cherry picked from commit 0583946ff70d73b5da579db1d81c9c374adf2cc3) --- pdns/dnsrecords.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 2f4fa33100..330e732cde 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -38,7 +38,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.47.2