From e25f6ef0cdd1780577dffeaca8ba8b19b5697880 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Jan 2002 17:19:20 +0000 Subject: [PATCH] Add a safety check to bvcasechr --- servers/slapd/schema_init.c | 2 ++ 1 file changed, 2 insertions(+) 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] ) { -- 2.39.5