From: Axel Viala Date: Mon, 22 Aug 2022 11:46:54 +0000 (+0200) Subject: fixup: Optionnal removal of plen. X-Git-Tag: dnsdist-1.8.0-rc1~209^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d298da97d002b87d0a55c93ab6759207e1c946de;p=thirdparty%2Fpdns.git fixup: Optionnal removal of plen. --- diff --git a/pdns/dnsname.cc b/pdns/dnsname.cc index 747225e02b..db09f6c407 100644 --- a/pdns/dnsname.cc +++ b/pdns/dnsname.cc @@ -64,9 +64,9 @@ DNSName::DNSName(const std::string_view sw) if(!std::memchr(p, '\\', length)) { unsigned char lenpos=0; unsigned char labellen=0; - size_t plen=length; - const char* const pbegin=p, *pend=p+plen; - d_storage.reserve(plen+1); + const char* const pbegin=p, *pend=p+length; + + d_storage.reserve(length+1); for(auto iter = pbegin; iter != pend; ) { lenpos = d_storage.size(); if(*iter=='.')