]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/ppolicy.c
Merge remote-tracking branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
[openldap] / libraries / libldap / ppolicy.c
index c0d2390221a5c69da61bcd8e8edc8dee30c4255a..05f1873b277e150ec90aac38a154e933f0a74d81 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2004-2012 The OpenLDAP Foundation.
+ * Copyright 2004-2014 The OpenLDAP Foundation.
  * Portions Copyright 2004 Hewlett-Packard Company.
  * Portions Copyright 2004 Howard Chu, Symas Corp.
  * All rights reserved.
@@ -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);