From: W.C.A. Wijngaards Date: Fri, 5 Jul 2024 15:18:01 +0000 (+0200) Subject: - Fix #1099: Unbound core dump on SIGSEGV. X-Git-Tag: release-1.21.0rc1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b53d90053ec981543cf2a8e5e39783c142f7e644;p=thirdparty%2Funbound.git - Fix #1099: Unbound core dump on SIGSEGV. --- diff --git a/doc/Changelog b/doc/Changelog index 09d4aa6bc..5d195d37d 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,7 @@ 5 July 2024: Wouter - Fix for neater printout for error for missing DS response. - Fix neater printout. + - Fix #1099: Unbound core dump on SIGSEGV. 4 July 2024: Wouter - Fix to print details about the failure to lookup a DNSKEY record diff --git a/services/cache/dns.c b/services/cache/dns.c index 632ed79ac..3307f58fe 100644 --- a/services/cache/dns.c +++ b/services/cache/dns.c @@ -115,7 +115,9 @@ store_rrsets(struct module_env* env, struct reply_info* rep, time_t now, } /* if ref was updated make sure the message ttl is updated to * the minimum of the current rrsets. */ + lock_rw_rdlock(&rep->rrsets[i]->entry.lock); ttl = ((struct packed_rrset_data*)rep->rrsets[i]->entry.data)->ttl; + lock_rw_unlock(&rep->rrsets[i]->entry.lock); if(ttl < min_ttl) min_ttl = ttl; } if(min_ttl < rep->ttl) {