zlib legacy decompress: call check_fix_size method

so we also have the decompressed size in the metadata.
This commit is contained in:
Thomas Waldmann 2023-10-24 19:45:21 +02:00
parent 0cfdf6da91
commit 0ac525bb05
No known key found for this signature in database
GPG Key ID: 243ACFA951F78E01
1 changed files with 3 additions and 1 deletions

View File

@ -445,7 +445,9 @@ class ZLIB_legacy(CompressorBase):
meta["clevel"] = 255 # we do not know the compression level
meta["csize"] = len(data)
try:
return meta, zlib.decompress(data)
data = zlib.decompress(data)
self.check_fix_size(meta, data)
return meta, data
except zlib.error as e:
raise DecompressionError(str(e)) from None