]> git.sur5r.net Git - openldap/commitdiff
quick hack for ITS#3118; may need work
authorPierangelo Masarati <ando@openldap.org>
Wed, 28 Apr 2004 00:09:25 +0000 (00:09 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 28 Apr 2004 00:09:25 +0000 (00:09 +0000)
servers/slapd/schema_init.c

index 1daa99628c2c04d76d29a8daf2c86278e953e8ab..87e7786aafa6a23f233109febeb04e74f65efebd 100644 (file)
@@ -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++ )
        {