From: Wouter Wijngaards Date: Tue, 15 Jul 2014 14:42:57 +0000 (+0000) Subject: - Fix #596: Bail out of unbound-control list_local_zones when ssl X-Git-Tag: release-1.5.0rc1~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae7049063c4c76d4c4a234a1a2eb7b547e843402;p=thirdparty%2Funbound.git - Fix #596: Bail out of unbound-control list_local_zones when ssl write fails. git-svn-id: file:///svn/unbound/trunk@3193 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/daemon/remote.c b/daemon/remote.c index f93698080..46922e467 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -2088,8 +2088,13 @@ do_list_local_zones(SSL* ssl, struct worker* worker) RBTREE_FOR(z, struct local_zone*, &zones->ztree) { lock_rw_rdlock(&z->lock); dname_str(z->name, buf); - (void)ssl_printf(ssl, "%s %s\n", buf, - local_zone_type2str(z->type)); + if(!ssl_printf(ssl, "%s %s\n", buf, + local_zone_type2str(z->type))) { + /* failure to print */ + lock_rw_unlock(&z->lock); + lock_rw_unlock(&zones->lock); + return; + } lock_rw_unlock(&z->lock); } lock_rw_unlock(&zones->lock); diff --git a/doc/Changelog b/doc/Changelog index 39db2df31..705073087 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +15 July 2014: Wouter + - Fix #596: Bail out of unbound-control list_local_zones when ssl + write fails. + 13 July 2014: Wouter - Configure tests if main can be linked to from getentropy compat.