File 0219-ITS-9424-fix-serialNumberAndIssuerSerialCheck.patch of Package openldap2.18498

From 74221c209a910ecf1878a30ad7363e328919dd89 Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@openldap.org>
Date: Mon, 14 Dec 2020 19:03:27 +0000
Subject: [PATCH 219/222] ITS#9424 fix serialNumberAndIssuerSerialCheck

---
 servers/slapd/schema_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c
index 2d66ec2d5..0518fbc42 100644
--- a/servers/slapd/schema_init.c
+++ b/servers/slapd/schema_init.c
@@ -4291,7 +4291,7 @@ serialNumberAndIssuerSerialCheck(
 	if ( in->bv_len < 3 ) return LDAP_INVALID_SYNTAX;
 
 	/* no old format */
-	if ( in->bv_val[0] != '{' && in->bv_val[in->bv_len-1] != '}' ) return LDAP_INVALID_SYNTAX;
+	if ( in->bv_val[0] != '{' || in->bv_val[in->bv_len-1] != '}' ) return LDAP_INVALID_SYNTAX;
 
 	x.bv_val++;
 	x.bv_len -= 2;
-- 
2.30.0
openSUSE Build Service is sponsored by