From 068c52d8f565572504303705abb3b35445a9bb4d Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Thu, 22 Nov 2018 15:55:18 +0000 Subject: [PATCH] - Fix that empty zonefile means the zonefile is not set and not used. git-svn-id: file:///svn/unbound/trunk@4973 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 1 + services/authzone.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index 50c86f380..962b365e6 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -8,6 +8,7 @@ - Fix #4209: Crash in libunbound when called from getdns. - auth zone zonefiles can be in a chroot, the chroot directory components are removed before use. + - Fix that empty zonefile means the zonefile is not set and not used. 21 November 2018: Wouter - Scrub NS records from NODATA responses as well. diff --git a/services/authzone.c b/services/authzone.c index a25106bd2..18ea6389d 100644 --- a/services/authzone.c +++ b/services/authzone.c @@ -4799,7 +4799,7 @@ xfr_write_after_update(struct auth_xfer* xfr, struct module_env* env) lock_basic_lock(&xfr->lock); lock_rw_unlock(&env->auth_zones->lock); - if(z->zonefile == NULL) { + if(z->zonefile == NULL || z->zonefile[0] == 0) { lock_rw_unlock(&z->lock); /* no write needed, no zonefile set */ return; -- 2.47.3