mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-13 00:09:51 +02:00
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>
(cherry picked from commit a3a5a24519
)
This commit is contained in:
parent
8a33d5c9c6
commit
5ab58d3001
|
@ -515,7 +515,7 @@ host_and_port_from_url (const char *url, int *port)
|
||||||
if ((p = strchr (buf, '/')))
|
if ((p = strchr (buf, '/')))
|
||||||
*p++ = 0;
|
*p++ = 0;
|
||||||
strlwr (buf);
|
strlwr (buf);
|
||||||
if ((p = strchr (p, ':')))
|
if ((p = strchr (buf, ':')))
|
||||||
{
|
{
|
||||||
*p++ = 0;
|
*p++ = 0;
|
||||||
*port = atoi (p);
|
*port = atoi (p);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user