Ian Kent b160ae
autofs-5.1.0 - init qdn before use in get_query_dn()
Ian Kent b160ae
Ian Kent b160ae
From: Ian Kent <ikent@redhat.com>
Ian Kent b160ae
Ian Kent b160ae
Ensure qdn is initialized before use in case there's garbage in it.
Ian Kent b160ae
---
Ian Kent b160ae
 CHANGELOG             |    1 +
Ian Kent b160ae
 modules/lookup_ldap.c |    2 +-
Ian Kent b160ae
 2 files changed, 2 insertions(+), 1 deletion(-)
Ian Kent b160ae
Ian Kent b160ae
diff --git a/CHANGELOG b/CHANGELOG
Ian Kent b160ae
index 9e2dc89..7c0a7bb 100644
Ian Kent b160ae
--- a/CHANGELOG
Ian Kent b160ae
+++ b/CHANGELOG
Ian Kent b160ae
@@ -34,6 +34,7 @@
Ian Kent b160ae
 - gaurd against incorrect umount return.
Ian Kent b160ae
 - update man page autofs(8) for systemd.
Ian Kent b160ae
 - fix fix master map type check.
Ian Kent b160ae
+- init qdn before use in get_query_dn().
Ian Kent b160ae
 
Ian Kent b160ae
 04/06/2014 autofs-5.1.0
Ian Kent b160ae
 =======================
Ian Kent b160ae
diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
Ian Kent b160ae
index ac2ef30..5da613e 100644
Ian Kent b160ae
--- a/modules/lookup_ldap.c
Ian Kent b160ae
+++ b/modules/lookup_ldap.c
Ian Kent b160ae
@@ -335,7 +335,7 @@ LDAP *init_ldap_connection(unsigned logopt, const char *uri, struct lookup_conte
Ian Kent b160ae
 static int get_query_dn(unsigned logopt, LDAP *ldap, struct lookup_context *ctxt, const char *class, const char *key)
Ian Kent b160ae
 {
Ian Kent b160ae
 	char buf[MAX_ERR_BUF];
Ian Kent b160ae
-	char *query, *dn, *qdn;
Ian Kent b160ae
+	char *query, *dn, *qdn = NULL;
Ian Kent b160ae
 	LDAPMessage *result = NULL, *e;
Ian Kent b160ae
 	char *attrs[2];
Ian Kent b160ae
 	struct berval **value;