Skip to content

Commit

Permalink
Fix iter_relocations
Browse files Browse the repository at this point in the history
Iterator use `yield` and must not return anything other than `None`.

Fixes: b0d7a76 ("Support getting RELR relocations from dynamic section (#509)")
Signed-off-by: Philipp Hahn <[email protected]>
  • Loading branch information
pmhahn committed Feb 28, 2025
1 parent ac069e3 commit 64eafd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elftools/elf/relocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def iter_relocations(self):

# If DT_RELRSZ is zero, offset is meaningless and could be None.
if self._size == 0:
return []
return

limit = self._offset + self._size
relr = self._offset
Expand Down

0 comments on commit 64eafd5

Please sign in to comment.