Browse Source

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 <wk@gnupg.org>
dkg/gpgv-doc-improvement
Werner Koch 4 years ago
parent
commit
a3a5a24519
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
  1. 2
      dirmngr/misc.c

2
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);

Loading…
Cancel
Save