summaryrefslogtreecommitdiff
path: root/view/elf/elfview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'view/elf/elfview.cpp')
-rw-r--r--view/elf/elfview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/view/elf/elfview.cpp b/view/elf/elfview.cpp
index f4a089bd..801adf76 100644
--- a/view/elf/elfview.cpp
+++ b/view/elf/elfview.cpp
@@ -795,6 +795,13 @@ bool ElfView::Init()
while (!end)
{
uint64_t tag, value;
+ if (i >= m_dynamicTable.fileSize)
+ {
+ // Prevent reading past end of dynamic table in file
+ end = true;
+ break;
+ }
+
if (m_elf32) // 32-bit ELF
{
tag = reader.Read32();