Blame SOURCES/autofs-5.0.7-fix-add-null-check-in-parse_server_string.patch

304803
autofs-5.0.7 - fix add null check in parse_server_string()
304803
304803
From: Ian Kent <raven@themaw.net>
304803
304803
In a recent patch that added an error check for the case there's no ':' server
304803
name delimiter parse_server_string() braces were not added which lead to an
304803
incorrect parse error.
304803
---
304803
 CHANGELOG             |    1 +
304803
 modules/lookup_ldap.c |    4 ++--
304803
 2 files changed, 3 insertions(+), 2 deletions(-)
304803
304803
diff --git a/CHANGELOG b/CHANGELOG
304803
index 503a21e..5d90139 100644
304803
--- a/CHANGELOG
304803
+++ b/CHANGELOG
304803
@@ -52,6 +52,7 @@
304803
 - add changlog entry for coverity fixes.
304803
 - fix probe each nfs version in turn for singleton mounts.
304803
 - misc man page fixes.
304803
+- fix add null check in parse_server_string().
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
304803
index 35ea6ea..a2bfafd 100644
304803
--- a/modules/lookup_ldap.c
304803
+++ b/modules/lookup_ldap.c
304803
@@ -1210,14 +1210,14 @@ static int parse_server_string(unsigned logopt, const char *url, struct lookup_c
304803
 		const char *q = NULL;
304803
 
304803
 		/* Isolate the server. Include the port spec */
304803
-		if (*ptr != '[')
304803
+		if (*ptr != '[') {
304803
 			q = strchr(ptr, ':');
304803
 			if (!q) {
304803
 				crit(logopt, MODPREFIX
304803
 				     "LDAP server name not found in %s", ptr);
304803
 				return 0;
304803
 			}
304803
-		else {
304803
+		} else {
304803
 			q = ++ptr;
304803
 			while (*q == ':' || isxdigit(*q))
304803
 				q++;