diff --git a/src/fileformat/file_format/pe/pe_format.cpp b/src/fileformat/file_format/pe/pe_format.cpp index 22dad022..e806e02a 100644 --- a/src/fileformat/file_format/pe/pe_format.cpp +++ b/src/fileformat/file_format/pe/pe_format.cpp @@ -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