]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9370 check for equality rule on old_rdn
authorHoward Chu <hyc@openldap.org>
Mon, 19 Oct 2020 13:03:41 +0000 (14:03 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 22 Oct 2020 16:31:33 +0000 (16:31 +0000)
Just skip normalization if there's no equality rule. We accept
DNs without equality rules already.

servers/slapd/modrdn.c

index c73dd8dbaa5586b0137423e0056904fe88f10237..a22975540c1eea68a0e3fae248a60127f61216c9 100644 (file)
@@ -505,7 +505,7 @@ slap_modrdn2mods(
                        mod_tmp->sml_values = ( BerVarray )ch_malloc( 2 * sizeof( struct berval ) );
                        ber_dupbv( &mod_tmp->sml_values[0], &old_rdn[d_cnt]->la_value );
                        mod_tmp->sml_values[1].bv_val = NULL;
-                       if( desc->ad_type->sat_equality->smr_normalize) {
+                       if( desc->ad_type->sat_equality && desc->ad_type->sat_equality->smr_normalize) {
                                mod_tmp->sml_nvalues = ( BerVarray )ch_malloc( 2 * sizeof( struct berval ) );
                                (void) (*desc->ad_type->sat_equality->smr_normalize)(
                                        SLAP_MR_EQUALITY|SLAP_MR_VALUE_OF_ASSERTION_SYNTAX,