From: Pierangelo Masarati Date: Wed, 28 Apr 2004 00:09:25 +0000 (+0000) Subject: quick hack for ITS#3118; may need work X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~415 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5e5e0cd98adcce3afa4db99c3da74f1d9fc8b1f5;p=openldap quick hack for ITS#3118; may need work --- 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++ ) {