Fixed crash when entryTypeRecord is NULL

This commit is contained in:
Ladislav Zezula 2024-02-13 12:46:55 +01:00
parent 094a37393f
commit 887f20e81b

View File

@ -1427,7 +1427,7 @@ ELFIO::section* ElfFormat::addPltRelocationTable(ELFIO::section *dynamicSection,
const auto *relEntrySizeRecord = table.getRecordOfType(DT_RELENT);
const auto *relaEntrySizeRecord = table.getRecordOfType(DT_RELAENT);
if(!pltgotRecord || !addrRecord || !sizeRecord)
if(!pltgotRecord || !addrRecord || !sizeRecord || !entryTypeRecord)
{
return nullptr;
}