From 5e5e0cd98adcce3afa4db99c3da74f1d9fc8b1f5 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 28 Apr 2004 00:09:25 +0000 Subject: [PATCH] quick hack for ITS#3118; may need work --- servers/slapd/schema_init.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index 1daa99628c..87e7786aaf 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -2791,18 +2791,18 @@ firstComponentNormalize( { int rc; struct berval oid; - ber_len_t len; + ber_len_t len = 0; - if( val->bv_len < 3 ) return LDAP_INVALID_SYNTAX; + if( val->bv_len == 0 ) return LDAP_INVALID_SYNTAX; - if( val->bv_val[0] != '(' /*')'*/ && - val->bv_val[0] != '{' /*'}'*/ ) + if( val->bv_val[0] == '(' /*')'*/ || + val->bv_val[0] == '{' /*'}'*/ ) { - return LDAP_INVALID_SYNTAX; + len = 1; } /* trim leading white space */ - for( len=1; + for( ; len < val->bv_len && ASCII_SPACE(val->bv_val[len]); len++ ) { -- 2.39.5