- Fix bug #477: unbound-anchor segfaults if EDNS is blocked.

git-svn-id: file:///svn/unbound/trunk@2778 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2012-10-30 15:13:53 +00:00
parent 79ffc1ab81
commit c3f6ca3997
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,6 @@
30 October 2012: Wouter
- Fix bug #477: unbound-anchor segfaults if EDNS is blocked.
29 October 2012: Matthijs
- Fix validation for responses with both CNAME and wildcard
expanded CNAME records in answer section.

View file

@ -540,6 +540,11 @@ resolve_host_ip(struct ub_ctx* ctx, char* host, int port, int tp, int cl,
ub_ctx_delete(ctx);
exit(0);
}
if(!res->havedata || res->rcode || !res->data) {
if(verb) printf("resolve %s %s: no result\n", host,
(tp==LDNS_RR_TYPE_A)?"A":"AAAA");
return;
}
for(i = 0; res->data[i]; i++) {
struct ip_list* ip = RR_to_ip(tp, res->data[i], res->len[i],
port);