_parse(): safeguard against zero entry size

This commit is contained in:
Yacine Elhamer
2023-04-22 01:10:26 +01:00
parent 69d44cdc16
commit 07e6407115

View File

@@ -651,6 +651,9 @@ class SymTab:
return the symbol's information in
the order specified by sys/elf32.h
"""
if self.symtab.entsize == 0:
return
for i in range(int(len(self.symtab.buf) / self.symtab.entsize)):
if bitness == 32:
name_offset, value, size, info, other, shndx = struct.unpack_from(