[openssh-commits] [openssh] 01/01: avoid uninitialised free of ldns_res

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Dec 30 08:20:26 EST 2014

This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 462082eacbd37778a173afb6b84c6f4d898a18b5
Author: Damien Miller <djm at google.com>
Date:   Tue Dec 30 08:16:11 2014 +1100

    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
 openbsd-compat/getrrsetbyname-ldns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openbsd-compat/getrrsetbyname-ldns.c b/openbsd-compat/getrrsetbyname-ldns.c
index 343720f..4647b62 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;

To stop receiving notification emails like this one, please contact
djm at mindrot.org.

More information about the openssh-commits mailing list