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