1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 14:47:35 +00:00

LibCompress: Implement proper handling of LZMA end-of-stream markers

This commit is contained in:
Tim Schumacher 2023-03-30 00:39:36 +02:00 committed by Andreas Kling
parent b6f3b2f116
commit 8ff36e5910
4 changed files with 34 additions and 12 deletions

View file

@ -106,6 +106,9 @@ ErrorOr<Bytes> Lzma2Decompressor::read_some(Bytes bytes)
.position_bits = properties.position_bits,
.dictionary_size = static_cast<u32>(dictionary_size),
.uncompressed_size = uncompressed_size,
// Note: This is not specified anywhere. However, it is apparently tested by bad-1-lzma2-7.xz from the XZ utils test files.
.reject_end_of_stream_marker = true,
};
[[fallthrough]];
}