X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fppolicy.c;h=fea82efd27eca2853b0128ada42b37a6690130fe;hb=9b5972dc9e14e1f7a7bef755bfd0dc61bcf1ffb3;hp=31f68cf136be6ebfe4dc0b6fdc93a8ef38fe5ca0;hpb=d10bcd55f83ce4dcdb3456f3ccf98718410e20c7;p=openldap diff --git a/libraries/libldap/ppolicy.c b/libraries/libldap/ppolicy.c index 31f68cf136..fea82efd27 100644 --- a/libraries/libldap/ppolicy.c +++ b/libraries/libldap/ppolicy.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2004-2013 The OpenLDAP Foundation. + * Copyright 2004-2016 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);