1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:28:11 +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

@ -166,7 +166,6 @@ TEST_CASE(specification_bad_incorrect_size_lzma_decompress)
auto stream = MUST(try_make<FixedMemoryStream>(compressed));
auto decompressor = MUST(Compress::LzmaDecompressor::create_from_container(move(stream)));
// FIXME: This should detect that there is still remaining (non-'end of stream') data after the expected data and reject the last read.
// As of now, this test accepts any result, except for crashes.
(void)decompressor->read_until_eof(PAGE_SIZE);
auto buffer_or_error = decompressor->read_until_eof(PAGE_SIZE);
EXPECT(buffer_or_error.is_error());
}