mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 09:39:45 -05:00
catch invalid read (i == -1)
This commit is contained in:
parent
23423cd086
commit
7bcbd40344
1 changed files with 3 additions and 2 deletions
|
|
@ -901,16 +901,17 @@ int slap_mods_check(
|
|||
}
|
||||
}
|
||||
done:
|
||||
j = ix[i];
|
||||
slap_sl_free( ix, ctx );
|
||||
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
return rc;
|
||||
} else if ( match == 0 ) {
|
||||
/* value exists already */
|
||||
assert( i >= 0 );
|
||||
assert( i < nvals );
|
||||
snprintf( textbuf, textlen,
|
||||
"%s: value #%d provided more than once",
|
||||
ml->sml_desc->ad_cname.bv_val, j );
|
||||
ml->sml_desc->ad_cname.bv_val, ix[i] );
|
||||
*text = textbuf;
|
||||
return LDAP_TYPE_OR_VALUE_EXISTS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue