From 022b1b234706bfee7c9d6229276e18194e340e9a Mon Sep 17 00:00:00 2001 From: bert hubert Date: Mon, 15 Oct 2018 09:28:36 +0200 Subject: [PATCH] make sure that makeDNSName parses "." correctly as root --- tdns/dns-storage.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tdns/dns-storage.cc b/tdns/dns-storage.cc index d9abe37..294ac02 100644 --- a/tdns/dns-storage.cc +++ b/tdns/dns-storage.cc @@ -34,6 +34,9 @@ DNSName operator+(const DNSName& a, const DNSName& b) DNSName makeDNSName(const std::string& str) { DNSName ret; + if(str==".") + return ret; + string part; for(const auto& c: str) { if(c=='.') {