if ( rc ) {
rc = slap_bv2undef_ad( &bdata, &mdb->mi_ads[i], &text, 0 );
} else {
+ if ( ad->ad_index >= MDB_MAXADS ) {
+ Debug( LDAP_DEBUG_ANY,
+ "mdb_adb_read: too many AttributeDescriptions in use\n",
+ 0, 0, 0 );
+ return LDAP_OTHER;
+ }
mdb->mi_adxs[ad->ad_index] = i;
mdb->mi_ads[i] = ad;
}
for (a=e->e_attrs; a; a=a->a_next) {
/* For AttributeDesc, we only store the attr index */
nat++;
+ if (a->a_desc->ad_index >= MDB_MAXADS) {
+ Debug( LDAP_DEBUG_ANY, "mdb_entry_partsize: too many AttributeDescriptions used\n",
+ 0, 0, 0 );
+ return LDAP_OTHER;
+ }
if (!mdb->mi_adxs[a->a_desc->ad_index]) {
int rc = mdb_ad_get(mdb, txn, a->a_desc);
if (rc)
ptr = (unsigned char *)(lp + eh->offset);
for (a=e->e_attrs; a; a=a->a_next) {
- if (a->a_desc->ad_index >= MDB_MAXADS) {
- Debug( LDAP_DEBUG_ANY, "mdb_entry_encode: too many AttributeDescriptions used\n",
- 0, 0, 0 );
- return LDAP_OTHER;
- }
*lp++ = mdb->mi_adxs[a->a_desc->ad_index];
l = a->a_numvals;
if (a->a_nvals != a->a_vals)