]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #1099: Unbound core dump on SIGSEGV.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 5 Jul 2024 15:18:01 +0000 (17:18 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 5 Jul 2024 15:18:01 +0000 (17:18 +0200)
doc/Changelog
services/cache/dns.c

index 09d4aa6bc8088ef2c1c0c564914a030e0a6b1e79..5d195d37da3c5a11d0a1786e9d214c4f578660cd 100644 (file)
@@ -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
index 632ed79ace490a7a825a96a8f197b919612f778a..3307f58fe0e7711231e4bd0f6a07ae22eb1996ff 100644 (file)
@@ -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) {