516ab0
autofs-5.1.0 - init qdn before use in get_query_dn()
516ab0
516ab0
From: Ian Kent <ikent@redhat.com>
516ab0
516ab0
Ensure qdn is initialized before use in case there's garbage in it.
516ab0
---
516ab0
 CHANGELOG             |    1 +
516ab0
 modules/lookup_ldap.c |    2 +-
516ab0
 2 files changed, 2 insertions(+), 1 deletion(-)
516ab0
516ab0
--- autofs-5.0.7.orig/CHANGELOG
516ab0
+++ autofs-5.0.7/CHANGELOG
516ab0
@@ -169,6 +169,7 @@
516ab0
 - fix macro usage in lookup_program.c.
516ab0
 - remove unused offset handling code.
516ab0
 - fix mount as you go offset selection.
516ab0
+- init qdn before use in get_query_dn().
516ab0
 
516ab0
 25/07/2012 autofs-5.0.7
516ab0
 =======================
516ab0
--- autofs-5.0.7.orig/modules/lookup_ldap.c
516ab0
+++ autofs-5.0.7/modules/lookup_ldap.c
516ab0
@@ -335,7 +335,7 @@ LDAP *init_ldap_connection(unsigned logo
516ab0
 static int get_query_dn(unsigned logopt, LDAP *ldap, struct lookup_context *ctxt, const char *class, const char *key)
516ab0
 {
516ab0
 	char buf[MAX_ERR_BUF];
516ab0
-	char *query, *dn, *qdn;
516ab0
+	char *query, *dn, *qdn = NULL;
516ab0
 	LDAPMessage *result = NULL, *e;
516ab0
 	char *attrs[2];
516ab0
 	struct berval **value;