Skip to content

Commit

Permalink
Merge pull request #1011 from androguard/axml-update
Browse files Browse the repository at this point in the history
fix for 1006
  • Loading branch information
erev0s committed Mar 10, 2024
2 parents 3ae3f44 + e45e584 commit a5aaf75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions androguard/core/axml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2230,6 +2230,9 @@ def __init__(self, buff, expected_type=None, possible_types=None):
if possible_types:
while True:
cur_pos = buff.tell()
if buff.raw.getbuffer().nbytes < cur_pos + self.SIZE:
# reached end of the file, cases where packers set the EndNamespace with zero size require that
return
self._type, self._header_size, self._size = unpack('<HHL', buff.read(self.SIZE))

if cur_pos == 0 or (
Expand Down

0 comments on commit a5aaf75

Please sign in to comment.