From: Kurt Zeilenga Date: Thu, 17 Jan 2002 17:19:20 +0000 (+0000) Subject: Add a safety check to bvcasechr X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~92 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e25f6ef0cdd1780577dffeaca8ba8b19b5697880;p=openldap Add a safety check to bvcasechr --- diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index ebc41fa68f..a6aa3ceca8 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -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] ) {