Skip to content

Commit

Permalink
zlib legacy decompress: call check_fix_size method
Browse files Browse the repository at this point in the history
so we also have the decompressed size in the metadata.
  • Loading branch information
ThomasWaldmann committed Oct 24, 2023
1 parent 0cfdf6d commit 0ac525b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/borg/compress.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0ac525b

Please sign in to comment.