]> git.sur5r.net Git - openldap/commitdiff
Import numericString fix from HEAD
authorKurt Zeilenga <kurt@openldap.org>
Sat, 2 Jun 2001 02:48:35 +0000 (02:48 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 2 Jun 2001 02:48:35 +0000 (02:48 +0000)
servers/slapd/schema_init.c

index 2aa66134171bace6ced6583411366f048e924eda..95d988dcb37675cd3ce18cbbc8650ab8c6bb80e0 100644 (file)
@@ -408,6 +408,7 @@ bitStringValidate(
        if( in->bv_len < 3 ) {
                return LDAP_INVALID_SYNTAX;
        }
+
        if( in->bv_val[0] != 'B' ||
                in->bv_val[1] != '\'' ||
                in->bv_val[in->bv_len-1] != '\'' )
@@ -3182,8 +3183,6 @@ numericStringValidate(
 {
        ber_len_t i;
 
-       /* disallow empty numeric strings */
-
        for(i=0; i < in->bv_len; i++) {
                if( !SLAP_NUMERIC(in->bv_val[i]) ) {
                        return LDAP_INVALID_SYNTAX;
@@ -3218,7 +3217,7 @@ numericStringNormalize(
                }
        }
 
-       assert( newval->bv_val < p );
+       assert( newval->bv_val <= p );
        assert( q <= p );
 
        /* null terminate */