mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
ITS#7146 check for ad_index overflow
Temporary fix...
This commit is contained in:
parent
d2958a2a4e
commit
9d3b1af2ff
@ -569,6 +569,11 @@ static int mdb_entry_encode(Operation *op, Entry *e, MDB_val *data, Ecount *eh)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user