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

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