Commit e25f6ef0 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Add a safety check to bvcasechr

parent 1ea0d20e
...@@ -86,6 +86,8 @@ static char *bvcasechr( struct berval *bv, int c, ber_len_t *len ) ...@@ -86,6 +86,8 @@ static char *bvcasechr( struct berval *bv, int c, ber_len_t *len )
ber_len_t i; ber_len_t i;
int lower = TOLOWER( c ); int lower = TOLOWER( c );
int upper = TOUPPER( c ); int upper = TOUPPER( c );
if( c == 0 ) return NULL;
for( i=0; i < bv->bv_len; i++ ) { for( i=0; i < bv->bv_len; i++ ) {
if( upper == bv->bv_val[i] || lower == bv->bv_val[i] ) { if( upper == bv->bv_val[i] || lower == bv->bv_val[i] ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment