mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:37:35 +00:00
LibCompress: Implement block size validation for XZ streams
This commit is contained in:
parent
20f1a29202
commit
ad31265e60
3 changed files with 51 additions and 17 deletions
|
@ -14,6 +14,7 @@
|
|||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/Stream.h>
|
||||
#include <AK/Vector.h>
|
||||
|
||||
namespace Compress {
|
||||
|
||||
|
@ -116,7 +117,15 @@ private:
|
|||
bool m_found_last_stream_footer { false };
|
||||
|
||||
Optional<MaybeOwned<Stream>> m_current_block_stream {};
|
||||
Optional<u64> m_current_block_uncompressed_size {};
|
||||
Optional<u64> m_current_block_expected_uncompressed_size {};
|
||||
u64 m_current_block_uncompressed_size {};
|
||||
u64 m_current_block_start_offset {};
|
||||
|
||||
struct BlockMetadata {
|
||||
u64 uncompressed_size {};
|
||||
u64 unpadded_size {};
|
||||
};
|
||||
Vector<BlockMetadata> m_processed_blocks;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue