From: Howard Chu Date: Sat, 7 Dec 2013 16:36:14 +0000 (-0800) Subject: ITS#7759 avoid assert in parse_passwdpolicy_control X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=80e6316d37dd024bf32ed6db024f195c1b51ef7f;p=openldap ITS#7759 avoid assert in parse_passwdpolicy_control --- diff --git a/libraries/libldap/ppolicy.c b/libraries/libldap/ppolicy.c index 31f68cf136..3bdb603d91 100644 --- a/libraries/libldap/ppolicy.c +++ b/libraries/libldap/ppolicy.c @@ -134,6 +134,11 @@ ldap_parse_passwordpolicy_control( assert( LDAP_VALID( ld ) ); assert( ctrl != NULL ); + if ( !ctrl->ldctl_value.bv_val ) { + ld->ld_errno = LDAP_DECODING_ERROR; + return(ld->ld_errno); + } + /* Create a BerElement from the berval returned in the control. */ ber = ber_init(&ctrl->ldctl_value);