diff options
-rw-r--r-- | usr.bin/ldap/ber.c | 5 | ||||
-rw-r--r-- | usr.sbin/ldapd/ber.c | 5 | ||||
-rw-r--r-- | usr.sbin/snmpd/ber.c | 4 | ||||
-rw-r--r-- | usr.sbin/ypldap/ber.c | 5 |
4 files changed, 11 insertions, 8 deletions
diff --git a/usr.bin/ldap/ber.c b/usr.bin/ldap/ber.c index eb7e3d8ab06..286a50d3a47 100644 --- a/usr.bin/ldap/ber.c +++ b/usr.bin/ldap/ber.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ber.c,v 1.1 2018/06/13 15:45:57 reyk Exp $ */ +/* $OpenBSD: ber.c,v 1.2 2018/06/27 13:22:17 rob Exp $ */ /* * Copyright (c) 2007 Reyk Floeter <reyk@vantronix.net> @@ -861,7 +861,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); 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); diff --git a/usr.sbin/snmpd/ber.c b/usr.sbin/snmpd/ber.c index 55c63d423da..1f750fbd08a 100644 --- a/usr.sbin/snmpd/ber.c +++ b/usr.sbin/snmpd/ber.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ber.c,v 1.32 2018/02/08 18:02:06 jca Exp $ */ +/* $OpenBSD: ber.c,v 1.33 2018/06/27 13:22:17 rob Exp $ */ /* * Copyright (c) 2007, 2012 Reyk Floeter <reyk@openbsd.org> @@ -880,7 +880,7 @@ 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_class != BER_CLASS_CONTEXT && + if (root->be_class == BER_CLASS_UNIVERSAL && root->be_type == BER_TYPE_EOC && root->be_len == 0) return (0); diff --git a/usr.sbin/ypldap/ber.c b/usr.sbin/ypldap/ber.c index d66737090a8..2058f61c190 100644 --- a/usr.sbin/ypldap/ber.c +++ b/usr.sbin/ypldap/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> @@ -861,7 +861,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); |