From 3252361b3c07dc3a3954eac9d97072fb0b174a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 16 Mar 2021 17:56:04 +0100 Subject: [PATCH] fix: Skip nameless sections in ELF Related: #678 --- pymisp/tools/elfobject.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pymisp/tools/elfobject.py b/pymisp/tools/elfobject.py index 78c7f62..96e51d5 100644 --- a/pymisp/tools/elfobject.py +++ b/pymisp/tools/elfobject.py @@ -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