summaryrefslogtreecommitdiff
path: root/openbsd-compat/getrrsetbyname-ldns.c
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/getrrsetbyname-ldns.c
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/getrrsetbyname-ldns.c')
-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 343720f1..4647b623 100644
--- a/openbsd-compat/getrrsetbyname-ldns.c
+++ b/openbsd-compat/getrrsetbyname-ldns.c
@@ -69,7 +69,7 @@ getrrsetbyname(const char *hostname, unsigned int rdclass,
struct rrsetinfo *rrset = NULL;
struct rdatainfo *rdata;
size_t len;
- ldns_resolver *ldns_res;
+ ldns_resolver *ldns_res = NULL;
ldns_rdf *domain = NULL;
ldns_pkt *pkt = NULL;
ldns_rr_list *rrsigs = NULL, *rrdata = NULL;