From 887f20e81bae6d6fd4aec756693f39e6aadead41 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Tue, 13 Feb 2024 12:46:55 +0100 Subject: [PATCH] Fixed crash when entryTypeRecord is NULL --- src/fileformat/file_format/elf/elf_format.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileformat/file_format/elf/elf_format.cpp b/src/fileformat/file_format/elf/elf_format.cpp index 877cbef45..7c1319d8b 100644 --- a/src/fileformat/file_format/elf/elf_format.cpp +++ b/src/fileformat/file_format/elf/elf_format.cpp @@ -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; }