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
(cherry picked from commit a3a5a2451924640588e5ecc03a1d4ba6a6ba94a5)
- GnuPG-bug-id: T4230
- Signed-off-by: Werner Koch <wk@gnupg.org>