From 80e6316d37dd024bf32ed6db024f195c1b51ef7f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 7 Dec 2013 08:36:14 -0800 Subject: [PATCH] ITS#7759 avoid assert in parse_passwdpolicy_control --- libraries/libldap/ppolicy.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.39.5