]> git.sur5r.net Git - openldap/commitdiff
ITS#4823 allow zero-length IA5String
authorHoward Chu <hyc@openldap.org>
Mon, 29 Jan 2007 04:39:54 +0000 (04:39 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 29 Jan 2007 04:39:54 +0000 (04:39 +0000)
servers/slapd/schema_init.c

index 6f218dcf95e81ce2b2f22a6b67af561274bbf48b..8eec00300e9d7171a8ffa9cf93ce8c4b28f0f83e 100644 (file)
@@ -2049,8 +2049,6 @@ IA5StringValidate(
 {
        ber_len_t i;
 
-       if( BER_BVISEMPTY( val ) ) return LDAP_INVALID_SYNTAX;
-
        for(i=0; i < val->bv_len; i++) {
                if( !LDAP_ASCII(val->bv_val[i]) ) {
                        return LDAP_INVALID_SYNTAX;
@@ -2073,8 +2071,6 @@ IA5StringNormalize(
        int casefold = !SLAP_MR_ASSOCIATED( mr,
                slap_schema.si_mr_caseExactIA5Match );
 
-       assert( !BER_BVISEMPTY( val ) );
-
        assert( SLAP_MR_IS_VALUE_OF_SYNTAX( use ) != 0 );
 
        p = val->bv_val;
@@ -2117,12 +2113,6 @@ IA5StringNormalize(
        *q = '\0';
 
        normalized->bv_len = q - normalized->bv_val;
-       if( BER_BVISEMPTY( normalized ) ) {
-               normalized->bv_val = slap_sl_realloc( normalized->bv_val, 2, ctx );
-               normalized->bv_val[0] = ' ';
-               normalized->bv_val[1] = '\0';
-               normalized->bv_len = 1;
-       }
 
        return LDAP_SUCCESS;
 }