fix: Skip nameless sections in ELF

Related: #678
pull/749/head
Raphaël Vinot 2021-03-16 17:56:04 +01:00
parent 31608b1480
commit 3252361b3c
1 changed files with 2 additions and 0 deletions

View File

@ -65,6 +65,8 @@ class ELFObject(AbstractMISPObjectGenerator):
if self.__elf.sections:
pos = 0
for section in self.__elf.sections:
if not section.name:
continue
s = ELFSectionObject(section, standalone=self._standalone, default_attributes_parameters=self._default_attributes_parameters)
self.add_reference(s.uuid, 'includes', 'Section {} of ELF'.format(pos))
pos += 1