mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-01 12:39:35 -05:00
Add a safety check to bvcasechr
This commit is contained in:
parent
1ea0d20e82
commit
e25f6ef0cd
1 changed files with 2 additions and 0 deletions
|
|
@ -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] ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue