ITS#7759 avoid assert in parse_passwdpolicy_control

This commit is contained in:
Howard Chu 2013-12-07 08:36:14 -08:00
parent f8efeb4278
commit 80e6316d37

View File

@ -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);