aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/misc.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-11-05 07:59:13 +0000
committerWerner Koch <[email protected]>2018-11-05 08:04:32 +0000
commit5ab58d3001b0342aecaf691b1af70b1f76426f55 (patch)
tree92e3e1e95b400fc64e276cdc334dc8cfa8480d75 /dirmngr/misc.c
parentbuild: By default build wks-tools on all Unix platforms. (diff)
downloadgnupg-5ab58d3001b0342aecaf691b1af70b1f76426f55.tar.gz
gnupg-5ab58d3001b0342aecaf691b1af70b1f76426f55.zip
dirmngr: Fix LDAP port parsing.
* dirmngr/misc.c (host_and_port_from_url): Fix bad port parsing and a segv for a missing slash after the host name. -- Reportted-by: Tomas Mraz GnuPG-bug-id: 4230 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit a3a5a2451924640588e5ecc03a1d4ba6a6ba94a5)
Diffstat (limited to 'dirmngr/misc.c')
-rw-r--r--dirmngr/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dirmngr/misc.c b/dirmngr/misc.c
index 6291a9a35..eef04ed83 100644
--- a/dirmngr/misc.c
+++ b/dirmngr/misc.c
@@ -515,7 +515,7 @@ host_and_port_from_url (const char *url, int *port)
if ((p = strchr (buf, '/')))
*p++ = 0;
strlwr (buf);
- if ((p = strchr (p, ':')))
+ if ((p = strchr (buf, ':')))
{
*p++ = 0;
*port = atoi (p);