diff options
author | rob <rob@openbsd.org> | 2018-06-27 13:22:17 +0000 |
---|---|---|
committer | rob <rob@openbsd.org> | 2018-06-27 13:22:17 +0000 |
commit | 692a3bcfecfd915e57055ccef86953c3111bbec2 (patch) | |
tree | 6ed763bf149fc036f16e2f410bce6301b512a87b /usr.sbin/ldapd | |
parent | Just put the aspath and the peer directly into the prefix struct. (diff) | |
download | wireguard-openbsd-692a3bcfecfd915e57055ccef86953c3111bbec2.tar.xz wireguard-openbsd-692a3bcfecfd915e57055ccef86953c3111bbec2.zip |
Synchronize correct processing of BER_TYPE_EOC. Fixes support for empty LDAP
passwords. A similar fix was applied to snmpd in 2010 (rev 1.23).
Pointers from Reyk.
Ok claudio@
Diffstat (limited to 'usr.sbin/ldapd')
-rw-r--r-- | usr.sbin/ldapd/ber.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ldapd/ber.c b/usr.sbin/ldapd/ber.c index 02d1b7d2020..2a3988db5ce 100644 --- a/usr.sbin/ldapd/ber.c +++ b/usr.sbin/ldapd/ber.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ber.c,v 1.13 2018/02/08 18:02:06 jca Exp $ */ +/* $OpenBSD: ber.c,v 1.14 2018/06/27 13:22:17 rob Exp $ */ /* * Copyright (c) 2007 Reyk Floeter <reyk@vantronix.net> @@ -874,7 +874,8 @@ ber_calc_len(struct ber_element *root) size += ber_calc_len(root->be_next); /* This is an empty element, do not use a minimal size */ - if (root->be_type == BER_TYPE_EOC && root->be_len == 0) + if (root->be_class == BER_CLASS_UNIVERSAL && + root->be_type == BER_TYPE_EOC && root->be_len == 0) return (0); return (root->be_len + size); |