Skip to content

Commit f5bf35d

Browse files
committed
verify relocation sections have non-zero sizes
1 parent 4925211 commit f5bf35d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

view/elf/elfview.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2250,7 +2250,7 @@ bool ElfView::Init()
22502250
}
22512251
}
22522252

2253-
if (m_relocSection.size)
2253+
if (m_relocSection.size && m_relocSection.entrySize > 0)
22542254
{
22552255
StructureBuilder relocationTableBuilder;
22562256
if (m_elf32)
@@ -2274,7 +2274,7 @@ bool ElfView::Init()
22742274
DefineAutoSymbol(new Symbol(DataSymbol, "__elf_rel_table", m_relocSection.offset, NoBinding));
22752275
}
22762276

2277-
if (m_relocaSection.size)
2277+
if (m_relocaSection.size && m_relocaSection.entrySize > 0)
22782278
{
22792279
StructureBuilder relocationATableBuilder;
22802280
if (m_elf32)

0 commit comments

Comments
 (0)