diff options
| author | Dan Engelbrecht <[email protected]> | 2025-12-10 23:57:12 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-12-10 23:57:12 +0100 |
| commit | 1425e5d1b2d528cb6f99c73f7660fc7cc65a2e68 (patch) | |
| tree | c444bfa0b77c0157622a36c30200fefd4adfbd69 /src/zencore/compress.cpp | |
| parent | changelog (diff) | |
| download | zen-1425e5d1b2d528cb6f99c73f7660fc7cc65a2e68.tar.xz zen-1425e5d1b2d528cb6f99c73f7660fc7cc65a2e68.zip | |
fix zero length stream decompress (#685)
* fix validation during stream decompress of zero-size rawsize
Diffstat (limited to 'src/zencore/compress.cpp')
| -rw-r--r-- | src/zencore/compress.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zencore/compress.cpp b/src/zencore/compress.cpp index 5375a9f1d..25ed0fc46 100644 --- a/src/zencore/compress.cpp +++ b/src/zencore/compress.cpp @@ -340,7 +340,7 @@ public: const final { if (Header.Method == CompressionMethod::None && Header.TotalCompressedSize == CompressedData.GetSize() && - Header.TotalCompressedSize == Header.TotalRawSize + sizeof(BufferHeader) && RawOffset < Header.TotalRawSize && + Header.TotalCompressedSize == Header.TotalRawSize + sizeof(BufferHeader) && RawOffset <= Header.TotalRawSize && (RawOffset + RawSize) <= Header.TotalRawSize) { bool Result = true; |