summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
authorDamien Miller <djm@google.com>2014-12-30 08:16:11 +1100
committerDamien Miller <djm@google.com>2014-12-30 08:16:11 +1100
commit462082eacbd37778a173afb6b84c6f4d898a18b5 (patch)
treea50ef1ba6cc962300d0de99c8eb58d5128a78b85 /openbsd-compat
parent01b63498801053f131a0740eb9d13faf35d636c8 (diff)
avoid uninitialised free of ldns_res
If an invalid rdclass was passed to getrrsetbyname() then this would execute a free on an uninitialised pointer. OpenSSH only ever calls this with a fixed and valid rdclass. Reported by Joshua Rogers
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/getrrsetbyname-ldns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/getrrsetbyname-ldns.c b/openbsd-compat/getrrsetbyname-ldns.c
index 343720f10..4647b623b 100644
--- a/openbsd-compat/getrrsetbyname-ldns.c
+++ b/openbsd-compat/getrrsetbyname-ldns.c
@@ -69,7 +69,7 @@ getrrsetbyname(const char *hostname, unsigned int rdclass,
69 struct rrsetinfo *rrset = NULL; 69 struct rrsetinfo *rrset = NULL;
70 struct rdatainfo *rdata; 70 struct rdatainfo *rdata;
71 size_t len; 71 size_t len;
72 ldns_resolver *ldns_res; 72 ldns_resolver *ldns_res = NULL;
73 ldns_rdf *domain = NULL; 73 ldns_rdf *domain = NULL;
74 ldns_pkt *pkt = NULL; 74 ldns_pkt *pkt = NULL;
75 ldns_rr_list *rrsigs = NULL, *rrdata = NULL; 75 ldns_rr_list *rrsigs = NULL, *rrdata = NULL;