diff options
author | gsoares <gsoares@openbsd.org> | 2018-06-28 02:41:49 +0000 |
---|---|---|
committer | gsoares <gsoares@openbsd.org> | 2018-06-28 02:41:49 +0000 |
commit | 2e79bb2c981f3b32e36dac4f62fec2773c456823 (patch) | |
tree | c90f980b6292e98cbe830521cfd3b01eb81c01b1 /usr.sbin/ldapd | |
parent | calling memset() after calloc() is redudant, since (diff) | |
download | wireguard-openbsd-2e79bb2c981f3b32e36dac4f62fec2773c456823.tar.xz wireguard-openbsd-2e79bb2c981f3b32e36dac4f62fec2773c456823.zip |
avoid passing NULL to asprintf(3) when there's no parent dn entry
OK jca@
Diffstat (limited to 'usr.sbin/ldapd')
-rw-r--r-- | usr.sbin/ldapd/index.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ldapd/index.c b/usr.sbin/ldapd/index.c index 2f9f4db7127..16408aed415 100644 --- a/usr.sbin/ldapd/index.c +++ b/usr.sbin/ldapd/index.c @@ -1,4 +1,4 @@ -/* $OpenBSD: index.c,v 1.11 2017/01/20 11:55:08 benno Exp $ */ +/* $OpenBSD: index.c,v 1.12 2018/06/28 02:41:49 gsoares Exp $ */ /* * Copyright (c) 2009 Martin Hedenfalk <martin@bzero.se> @@ -138,6 +138,7 @@ index_rdn_key(struct namespace *ns, struct btval *dn, struct btval *key) if (parent_dn == NULL) { rdnsz = dnsz; pdnsz = 0; + parent_dn = ""; } else { rdnsz = parent_dn - (char *)dn->data; pdnsz = dnsz - rdnsz - 1; |