]> granicus.if.org Git - pdns/commitdiff
auth: fix dot stripping in setContent()
authorKees Monshouwer <mind04@monshouwer.org>
Thu, 7 Feb 2019 13:25:14 +0000 (14:25 +0100)
committermind04 <mind04@monshouwer.org>
Thu, 7 Feb 2019 13:25:14 +0000 (14:25 +0100)
pdns/dnsrecords.cc

index c29f1794ddde40676e33baa837cb52ca5fef1665..d89419e23229f5bb130a627b32975658e89abe13 100644 (file)
@@ -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);
   }
 }