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