]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fixup: Apply @omoerbeek suggestion
authorAxel Viala <axel.viala@darnuria.eu>
Mon, 22 Aug 2022 10:24:43 +0000 (12:24 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 30 Nov 2022 13:21:54 +0000 (14:21 +0100)
pdns/dnsname.cc

index 4dde8c3982faa3541480563bf45db77b3420620f..74a166a596040e5ada99ed662ecfccd764f87d48 100644 (file)
@@ -55,7 +55,7 @@ void DNSName::throwSafeRangeError(const std::string& msg, const char* buf, size_
 
 DNSName::DNSName(const char* p, size_t length)
 {
-  if(length == 0 || p[0]==0 || (p[0]=='.' && p[1]==0)) {
+  if(length == 0 || (length == 1 && p[0]=='.')) {
     d_storage.assign(1, (char)0);
   } else {
     if(!std::memchr(p, '\\', length)) {