Skip to content
Snippets Groups Projects
Commit 0825e12b authored by Howard Chu's avatar Howard Chu
Browse files

ITS#1570 - avoid overflowing array when dups are present in IDLs

parent 5c4a924f
Branches
Tags
No related merge requests found
......@@ -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++;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment