X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fschema_init.c;h=a80f99e3bca9ca08981fabfabd57a77f18e9a0e8;hb=304c0cbbffd0087b9a7bfc06ba810fd089b810bc;hp=d177795925d03b6c41389b98669f9d4a53b9f282;hpb=0a438aaf4361027adf02499ff1eb2ec072e127e3;p=openldap diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index d177795925..a80f99e3bc 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2013 The OpenLDAP Foundation. + * Copyright 1998-2014 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -3713,12 +3713,14 @@ certificateExactNormalize( tag = ber_skip_tag( ber, &len ); /* SignatureAlg */ ber_skip_data( ber, len ); tag = ber_peek_tag( ber, &len ); /* IssuerDN */ - len = ber_ptrlen( ber ); - bvdn.bv_val = val->bv_val + len; - bvdn.bv_len = val->bv_len - len; + if ( len ) { + len = ber_ptrlen( ber ); + bvdn.bv_val = val->bv_val + len; + bvdn.bv_len = val->bv_len - len; - rc = dnX509normalize( &bvdn, &issuer_dn ); - if ( rc != LDAP_SUCCESS ) goto done; + rc = dnX509normalize( &bvdn, &issuer_dn ); + if ( rc != LDAP_SUCCESS ) goto done; + } normalized->bv_len = STRLENOF( "{ serialNumber , issuer rdnSequence:\"\" }" ) + sn2.bv_len + issuer_dn.bv_len;