dirmngr/src (ChangeLog ldap.c misc.c)
cvs user wk
cvs at cvs.gnupg.org
Fri Dec 10 16:07:23 CET 2004
Date: Friday, December 10, 2004 @ 16:15:45
Author: wk
Path: /cvs/dirmngr/dirmngr/src
Modified: ChangeLog ldap.c misc.c
* ldap.c (url_fetch_ldap): Use TMP and not a HOST which is always
NULL.
* misc.c (host_and_port_from_url): Fixed bad encoding detection.
-----------+
ChangeLog | 6 ++++++
ldap.c | 9 ++++++---
misc.c | 2 +-
3 files changed, 13 insertions(+), 4 deletions(-)
Index: dirmngr/src/ChangeLog
diff -u dirmngr/src/ChangeLog:1.32 dirmngr/src/ChangeLog:1.33
--- dirmngr/src/ChangeLog:1.32 Fri Dec 3 15:42:36 2004
+++ dirmngr/src/ChangeLog Fri Dec 10 16:15:45 2004
@@ -1,3 +1,9 @@
+2004-12-10 Werner Koch <wk at g10code.com>
+
+ * ldap.c (url_fetch_ldap): Use TMP and not a HOST which is always
+ NULL.
+ * misc.c (host_and_port_from_url): Fixed bad encoding detection.
+
2004-12-03 Werner Koch <wk at g10code.com>
* crlcache.c (crl_cache_load): Re-implement it.
Index: dirmngr/src/ldap.c
diff -u dirmngr/src/ldap.c:1.40 dirmngr/src/ldap.c:1.41
--- dirmngr/src/ldap.c:1.40 Wed Dec 1 17:11:14 2004
+++ dirmngr/src/ldap.c Fri Dec 10 16:15:45 2004
@@ -582,7 +582,7 @@
/* Create command line argument array. */
for (i=0; argv[i]; i++)
;
- arg_list = xcalloc (i+2, sizeof *arg_list);
+ arg_list = xcalloc (i+3, sizeof *arg_list);
arg_list[0] = strrchr (pgmname, '/');
if (arg_list[0])
arg_list[0]++;
@@ -786,8 +786,11 @@
else if (url)
{
char *tmp = host_and_port_from_url (url, &port);
- add_server_to_servers (host, port);
- xfree (tmp);
+ if (tmp)
+ {
+ add_server_to_servers (tmp, port);
+ xfree (tmp);
+ }
}
}
Index: dirmngr/src/misc.c
diff -u dirmngr/src/misc.c:1.10 dirmngr/src/misc.c:1.11
--- dirmngr/src/misc.c:1.10 Fri Dec 3 15:42:36 2004
+++ dirmngr/src/misc.c Fri Dec 10 16:15:45 2004
@@ -698,7 +698,7 @@
/* Remove quotes and make sure that no Nul has been encoded. */
if ((n = remove_percent_escapes (buf)) < 0
- || n != strlen (p) )
+ || n != strlen (buf) )
{
log_error (_("bad URL encoding detected\n"));
xfree (buf);
More information about the Gnupg-commits
mailing list