Blame SOURCES/openldap-ITS-9384-remove-assert-in-obsolete-csnNormalize23.patch

112c41
From bdb0d459187522a6063df13871b82ba8dcc6efe2 Mon Sep 17 00:00:00 2001
112c41
From: Howard Chu <hyc@openldap.org>
112c41
Date: Mon, 2 Nov 2020 16:01:14 +0000
112c41
Subject: [PATCH] ITS#9384 remove assert in obsolete csnNormalize23()
112c41
112c41
---
112c41
 servers/slapd/schema_init.c | 4 ++--
112c41
 1 file changed, 2 insertions(+), 2 deletions(-)
112c41
112c41
diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c
112c41
index 5812bc4b66..ea0d67aa62 100644
112c41
--- a/servers/slapd/schema_init.c
112c41
+++ b/servers/slapd/schema_init.c
112c41
@@ -5327,8 +5327,8 @@ csnNormalize23(
112c41
 	}
112c41
 	*ptr = '\0';
112c41
 
112c41
-	assert( ptr == &bv.bv_val[bv.bv_len] );
112c41
-	if ( csnValidate( syntax, &bv ) != LDAP_SUCCESS ) {
112c41
+	if ( ptr != &bv.bv_val[bv.bv_len] ||
112c41
+		csnValidate( syntax, &bv ) != LDAP_SUCCESS ) {
112c41
 		return LDAP_INVALID_SYNTAX;
112c41
 	}
112c41
 
112c41
-- 
112c41
GitLab
112c41