mirror of
https://github.com/avast/retdec.git
synced 2024-12-18 02:48:01 +00:00
Add check that the typelib customattribute parent points to Assembly table to ignore random GUIDs
This commit is contained in:
parent
5e73460d6b
commit
6711d05756
@ -2433,6 +2433,14 @@ void PeFormat::detectTypeLibId()
|
||||
for (std::size_t i = 1; i <= customAttributeTable->getNumberOfRows(); ++i)
|
||||
{
|
||||
auto customAttributeRow = customAttributeTable->getRow(i);
|
||||
|
||||
// Check that the parent is index into Assembly table
|
||||
MetadataTableType parent_table;
|
||||
if (customAttributeRow->parent.getTable(parent_table) && parent_table != MetadataTableType::Assembly)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (customAttributeRow->type.getIndex() == guidMemberRef)
|
||||
{
|
||||
// Its value is the TypeLib we are looking for
|
||||
|
Loading…
Reference in New Issue
Block a user