diff options
| author | Josh Ferrell <josh@vector35.com> | 2024-08-16 15:16:09 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2024-08-16 15:16:09 -0400 |
| commit | 086342aedfa97ff207d0c8e1993bf0ebff8a519a (patch) | |
| tree | fdcb88403cf8a0cd2bc758cabc4a975325a14ad1 /view | |
| parent | 385f2fa00e829aea8ec3ebb765785eeb2cbb5ca0 (diff) | |
Prevent reading past end of dynamic table
Diffstat (limited to 'view')
| -rw-r--r-- | view/elf/elfview.cpp | 7 |
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(); |
