From: Wouter Wijngaards Date: Mon, 1 Oct 2007 14:55:08 +0000 (+0000) Subject: crash fixup. X-Git-Tag: release-0.6~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7883b13f4100a6cfebc35caf06b90f8695625b6;p=thirdparty%2Funbound.git crash fixup. git-svn-id: file:///svn/unbound/trunk@651 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 013c1a342..6ccc5ebd7 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,7 @@ 1 October 2007: Wouter - skip F77, CXX, objC tests in configure step. + - fixup crash in refetch glue after a CNAME. + and protection against similar failures (with error print). 28 September 2007: Wouter - test case for unbound-checkconf, fixed so it also checks the diff --git a/iterator/iterator.c b/iterator/iterator.c index 462edcc63..a424f6a31 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -706,6 +706,10 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq, * When re-fetching glue we also need to ask the parent. */ if(iq->refetch_glue) { + if(!iq->dp) { + log_err("internal or malloc fail: no dp for refetch"); + return error_response(qstate, id, LDNS_RCODE_SERVFAIL); + } delname = iq->dp->name; delnamelen = iq->dp->namelen; } else { @@ -716,6 +720,7 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq, && !dname_is_root(delname)) { /* do not adjust root label, remove first label from delname */ dname_remove_label(&delname, &delnamelen); + iq->refetch_glue = 0; /* if CNAME causes restart, no refetch */ } while(1) {