]>
Commit | Line | Data |
---|---|---|
3d551623 PG |
1 | diff --git a/CHANGELOG b/CHANGELOG |
2 | index 6931791..91903e9 100644 | |
3 | --- a/CHANGELOG | |
4 | +++ b/CHANGELOG | |
5 | @@ -1,6 +1,7 @@ | |
6 | ??/??/2007 autofs-5.0.3 | |
7 | ----------------------- | |
8 | - include krb5.h in lookup_ldap.h (some openssl doesn't implicitly include it). | |
9 | +- correct initialization of local var in parse_server_string. | |
10 | ||
11 | 18/06/2007 autofs-5.0.2 | |
12 | ----------------------- | |
13 | diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c | |
14 | index 06506a0..de8d515 100644 | |
15 | --- a/modules/lookup_ldap.c | |
16 | +++ b/modules/lookup_ldap.c | |
17 | @@ -549,7 +549,7 @@ static int parse_server_string(const char *url, struct lookup_context *ctxt) | |
18 | const char *ptr, *name; | |
19 | int l, al_len; | |
20 | ||
21 | - *proto = '\0'; | |
22 | + memset(proto, 0, 9); | |
23 | ptr = url; | |
24 | ||
25 | debug(LOGOPT_NONE, | |
26 | @@ -620,7 +620,7 @@ static int parse_server_string(const char *url, struct lookup_context *ctxt) | |
27 | } else if (strchr(ptr, ':') != NULL) { | |
28 | char *q = NULL; | |
29 | ||
30 | - /* Isolate the server(s). Include the port spec */ | |
31 | + /* Isolate the server. Include the port spec */ | |
32 | q = strchr(ptr, ':'); | |
33 | if (isdigit(*q)) | |
34 | while (isdigit(*q)) | |
35 | @@ -633,7 +633,7 @@ static int parse_server_string(const char *url, struct lookup_context *ctxt) | |
36 | } | |
37 | ||
38 | l = q - ptr; | |
39 | - if (proto) { | |
40 | + if (*proto) { | |
41 | al_len = l + strlen(proto) + 2; | |
42 | tmp = malloc(al_len); | |
43 | } else { |