Skip to content

Commit

Permalink
Remove LDNS dep and fix a bug in libunbound const correctness fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tewinget committed Sep 25, 2014
1 parent 2248124 commit fab95ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/common/dns_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ std::vector<std::string> DNSResolver::get_ipv4(const std::string& url)

strncpy(urlC, url.c_str(), 999);
urlC[999] = '\0';
if (!check_address_syntax(url))
if (!check_address_syntax(urlC))
{
return addresses;
}
Expand Down Expand Up @@ -156,7 +156,7 @@ std::vector<std::string> DNSResolver::get_ipv6(const std::string& url)
strncpy(urlC, url.c_str(), 999);
urlC[999] = '\0';

if (!check_address_syntax(url))
if (!check_address_syntax(urlC))
{
return addresses;
}
Expand Down Expand Up @@ -186,7 +186,7 @@ std::vector<std::string> DNSResolver::get_txt_record(const std::string& url)
strncpy(urlC, url.c_str(), 999);
urlC[999] = '\0';

if (!check_address_syntax(url))
if (!check_address_syntax(urlC))
{
return records;
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/dns_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace tools
// RFC defines for record types and classes for DNS, gleaned from ldns source
const static int DNS_CLASS_IN = 1;
const static int DNS_TYPE_A = 1;
const static int DNS_TYPE_TXT = 6;
const static int DNS_TYPE_TXT = 16;
const static int DNS_TYPE_AAAA = 8;

struct DNSResolverData;
Expand Down

0 comments on commit fab95ae

Please sign in to comment.