mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-17 14:00:30 +08:00
ITS#1570 - avoid overflowing array when dups are present in IDLs
This commit is contained in:
parent
5c4a924f81
commit
0825e12b42
@ -1067,6 +1067,9 @@ idl_intersection(
|
||||
#endif
|
||||
|
||||
for ( ni = 0, ai = 0, bi = 0; ai < ID_BLOCK_NIDS(a); ai++ ) {
|
||||
if ( ID_BLOCK_ID(a, ai) < ID_BLOCK_ID(b, bi) ) {
|
||||
continue;
|
||||
}
|
||||
for ( ;
|
||||
bi < ID_BLOCK_NIDS(b) && ID_BLOCK_ID(b, bi) < ID_BLOCK_ID(a, ai);
|
||||
bi++ )
|
||||
@ -1080,6 +1083,7 @@ idl_intersection(
|
||||
|
||||
if ( ID_BLOCK_ID(b, bi) == ID_BLOCK_ID(a, ai) ) {
|
||||
ID_BLOCK_ID(n, ni++) = ID_BLOCK_ID(a, ai);
|
||||
bi++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user