mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-10 08:53:27 -05:00
ITS#8103 fix crash with more than 65535 aliases in a scope
This commit is contained in:
parent
dcd0fd27f6
commit
15347d1180
1 changed files with 6 additions and 0 deletions
|
|
@ -664,6 +664,11 @@ mdb_idscope(
|
|||
ptr += data.mv_size - sizeof(ID);
|
||||
memcpy( &id, ptr, sizeof(ID) );
|
||||
if ( id == base ) {
|
||||
if ( res[0] >= MDB_IDL_DB_SIZE-1 ) {
|
||||
/* too many aliases in scope. Fallback to range */
|
||||
MDB_IDL_RANGE( res, MDB_IDL_FIRST( ids ), MDB_IDL_LAST( ids ));
|
||||
goto leave;
|
||||
}
|
||||
res[0]++;
|
||||
res[res[0]] = ida;
|
||||
copy = 0;
|
||||
|
|
@ -685,6 +690,7 @@ mdb_idscope(
|
|||
if (!MDB_IDL_IS_RANGE( ids ))
|
||||
ids[0] = idc;
|
||||
|
||||
leave:
|
||||
mdb_cursor_close( cursor );
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue