Field name fixed in elt_symbol.read_data()

This commit is contained in:
Nicolas 2025-02-28 15:49:37 +01:00
parent d4c68c8e42
commit 1762c8c435
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ class elf_symbol():
""" """
assert self.section, 'This symbol is not associated to a data section' assert self.section, 'This symbol is not associated to a data section'
if self.section.type == 'SHT_NOBITS': if self.section.type == 'SHT_NOBITS':
return b'\x00' * self['sh_size'] return b'\x00' * self['st_size']
else: else:
offset = self.section['sh_offset'] + self['st_value'] offset = self.section['sh_offset'] + self['st_value']
return self.file.read_bytes(offset, self['st_size']) return self.file.read_bytes(offset, self['st_size'])