Blame SOURCES/autofs-5.1.0-check-host-macro-is-set-before-use.patch

304803
autofs-5.1.0 - check host macro is set before use
304803
304803
From: Ian Kent <ikent@redhat.com>
304803
304803
Check marco lookup return for ${host} in match_my_name() before using it.
304803
---
304803
 CHANGELOG           |    1 +
304803
 modules/parse_amd.c |    5 +++++
304803
 2 files changed, 6 insertions(+)
304803
304803
--- autofs-5.0.7.orig/CHANGELOG
304803
+++ autofs-5.0.7/CHANGELOG
304803
@@ -140,6 +140,7 @@
304803
 - fix buffer size checks in merge_options().
304803
 - check amd lex buffer len before copy.
304803
 - add return check in ldap check_map_indirect().
304803
+- check host macro is set before use.
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
--- autofs-5.0.7.orig/modules/parse_amd.c
304803
+++ autofs-5.0.7/modules/parse_amd.c
304803
@@ -238,6 +238,11 @@ static int match_my_name(unsigned int lo
304803
 			return 1;
304803
 	}
304803
 
304803
+	if (!v || !v->val) {
304803
+		error(logopt, "error: ${host} not set");
304803
+		goto out;
304803
+	}
304803
+
304803
 	/* Check if comparison value is an alias */
304803
 
304803
 	memset(&hints, 0, sizeof(hints));