summaryrefslogtreecommitdiffstats
path: root/dirmngr
diff options
context:
space:
mode:
authorKristian Fiskerstrand <kf@sumptuouscapital.com>2015-04-12 01:11:07 +0200
committerNeal H. Walfield <neal@g10code.com>2015-05-07 15:03:28 +0200
commitd0d4984cfec54dee727b9e9d33d09e33c6f2e182 (patch)
tree4d5b6d30d1cb931d97b83ac1584ac5413dbb5531 /dirmngr
parentagent: Improve some comments. (diff)
downloadgnupg2-d0d4984cfec54dee727b9e9d33d09e33c6f2e182.tar.xz
gnupg2-d0d4984cfec54dee727b9e9d33d09e33c6f2e182.zip
dirmngr: Fix segfault in ldap engine
(ks-engine-ldap.c) Fix segfault caused by missing check whether uri is initialized
Diffstat (limited to 'dirmngr')
-rw-r--r--dirmngr/ks-engine-ldap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dirmngr/ks-engine-ldap.c b/dirmngr/ks-engine-ldap.c
index aefd12a1b..4288119ee 100644
--- a/dirmngr/ks-engine-ldap.c
+++ b/dirmngr/ks-engine-ldap.c
@@ -306,7 +306,9 @@ ks_ldap_help (ctrl_t ctrl, parsed_uri_t uri)
"Supported methods: search, get, put\n";
gpg_error_t err;
- if (strcmp (uri->scheme, "ldap") == 0
+ if(!uri)
+ err = ks_print_help (ctrl, " ldap");
+ else if (strcmp (uri->scheme, "ldap") == 0
|| strcmp (uri->scheme, "ldaps") == 0
|| strcmp (uri->scheme, "ldapi") == 0)
err = ks_print_help (ctrl, data);