From: Aki Tuomi Date: Tue, 29 Sep 2015 16:07:39 +0000 (+0300) Subject: Initialize d_recurse X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~12^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f251482f680475d92df1f46597711597282ac9de;p=thirdparty%2Fpdns.git Initialize d_recurse fixes several issues --- diff --git a/pdns/dnsname.cc b/pdns/dnsname.cc index cdc6841559..227363d658 100644 --- a/pdns/dnsname.cc +++ b/pdns/dnsname.cc @@ -24,6 +24,7 @@ std::ostream & operator<<(std::ostream &os, const DNSName& d) DNSName::DNSName(const char* p) { d_empty=false; + d_recurse=0; auto labels = segmentDNSName(p); for(const auto& e : labels) appendRawLabel(e); diff --git a/pdns/dnsname.hh b/pdns/dnsname.hh index 7191710ede..82ba34911b 100644 --- a/pdns/dnsname.hh +++ b/pdns/dnsname.hh @@ -26,7 +26,7 @@ class DNSName { public: - DNSName() : d_empty(true) {} //!< Don't constructs the root name + DNSName() : d_empty(true), d_recurse(0) {} //!< Don't constructs the root name explicit DNSName(const char* p); //!< Constructs from a human formatted, escaped presentation explicit DNSName(const std::string& str) : DNSName(str.c_str()) {} //!< Constructs from a human formatted, escaped presentation DNSName(const char* p, int len, int offset, bool uncompress, uint16_t* qtype=0, uint16_t* qclass=0, unsigned int* consumed=0); //!< Construct from a DNS Packet, taking the first question if offset=12