From 8908da7dce7711af59c7f43b122f73293dca27ab Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 28 Jun 2012 15:21:32 +1000 Subject: - (dtucker) [openbsd-compat/getrrsetbyname-ldns.c] bz #2022: prevent null pointer deref in the client when built with LDNS and using DNSSEC with a CNAME. Patch from gregdlg+mr at hochet info. --- ChangeLog | 5 +++++ openbsd-compat/getrrsetbyname-ldns.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 499d3d2a1..1de0165be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +20120628 + - (dtucker) [openbsd-compat/getrrsetbyname-ldns.c] bz #2022: prevent null + pointer deref in the client when built with LDNS and using DNSSEC with a + CNAME. Patch from gregdlg+mr at hochet info. + 20120622 - (dtucker) [contrib/cygwin/ssh-host-config] Ensure that user sshd runs as can logon as a service. Patch from vinschen at redhat com. diff --git a/openbsd-compat/getrrsetbyname-ldns.c b/openbsd-compat/getrrsetbyname-ldns.c index 8ce5678c9..19666346b 100644 --- a/openbsd-compat/getrrsetbyname-ldns.c +++ b/openbsd-compat/getrrsetbyname-ldns.c @@ -205,7 +205,8 @@ getrrsetbyname(const char *hostname, unsigned int rdclass, } if (rr->_rr_class == rrset->rri_rdclass && - rr->_rr_type == LDNS_RR_TYPE_RRSIG) { + rr->_rr_type == LDNS_RR_TYPE_RRSIG && + rrset->rri_sigs) { rdata = &rrset->rri_sigs[index_sig++]; } -- cgit v1.2.3