]> git.sur5r.net Git - openldap/commitdiff
Add a safety check to bvcasechr
authorKurt Zeilenga <kurt@openldap.org>
Thu, 17 Jan 2002 17:19:20 +0000 (17:19 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 17 Jan 2002 17:19:20 +0000 (17:19 +0000)
servers/slapd/schema_init.c

index ebc41fa68f81f0b92e70456876cf8bda13691626..a6aa3ceca81cd0d01ce6b4786894c916f325e49a 100644 (file)
@@ -86,6 +86,8 @@ static char *bvcasechr( struct berval *bv, int c, ber_len_t *len )
        ber_len_t i;
        int lower = TOLOWER( c );
        int upper = TOUPPER( c );
+
+       if( c == 0 ) return NULL;
        
        for( i=0; i < bv->bv_len; i++ ) {
                if( upper == bv->bv_val[i] || lower == bv->bv_val[i] ) {