Blame SOURCES/openldap-ITS-9370-check-for-equality-rule-on-old_rdn.patch

56fce6
From 4c774220a752bf8e3284984890dc0931fe73165d Mon Sep 17 00:00:00 2001
56fce6
From: Howard Chu <hyc@openldap.org>
56fce6
Date: Mon, 19 Oct 2020 14:03:41 +0100
56fce6
Subject: [PATCH] ITS#9370 check for equality rule on old_rdn
56fce6
56fce6
Just skip normalization if there's no equality rule. We accept
56fce6
DNs without equality rules already.
56fce6
---
56fce6
 servers/slapd/modrdn.c | 2 +-
56fce6
 1 file changed, 1 insertion(+), 1 deletion(-)
56fce6
56fce6
diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c
56fce6
index c73dd8dba..a22975540 100644
56fce6
--- a/servers/slapd/modrdn.c
56fce6
+++ b/servers/slapd/modrdn.c
56fce6
@@ -505,7 +505,7 @@ slap_modrdn2mods(
56fce6
 			mod_tmp->sml_values = ( BerVarray )ch_malloc( 2 * sizeof( struct berval ) );
56fce6
 			ber_dupbv( &mod_tmp->sml_values[0], &old_rdn[d_cnt]->la_value );
56fce6
 			mod_tmp->sml_values[1].bv_val = NULL;
56fce6
-			if( desc->ad_type->sat_equality->smr_normalize) {
56fce6
+			if( desc->ad_type->sat_equality && desc->ad_type->sat_equality->smr_normalize) {
56fce6
 				mod_tmp->sml_nvalues = ( BerVarray )ch_malloc( 2 * sizeof( struct berval ) );
56fce6
 				(void) (*desc->ad_type->sat_equality->smr_normalize)(
56fce6
 					SLAP_MR_EQUALITY|SLAP_MR_VALUE_OF_ASSERTION_SYNTAX,
56fce6
-- 
56fce6
2.26.2
56fce6