Skip to content

Commit

Permalink
parser: Fix incorrect compression type for LZFSE_ENCRYPTED Image4 pay…
Browse files Browse the repository at this point in the history
…loads
  • Loading branch information
m1stadev committed Apr 5, 2024
1 parent db16b27 commit af033a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyimg4/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,9 @@ def size(self, size: int) -> None:
if 0 < size < len(self.data):
raise ValueError('Size cannot be less than the length of the payload data.')

if self.encrypted is True:
self._detect_compression(size, self._data)

self._size = size

def add_keybag(self, keybag: Keybag) -> None:
Expand Down

0 comments on commit af033a2

Please sign in to comment.