aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/compress.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-12-12 06:09:33 -0500
committerGitHub <[email protected]>2023-12-12 12:09:33 +0100
commitd1f7e8a8f9aed001bb7c5dd653ee2678d2bffaf3 (patch)
tree4865b08c6ed03f0f867194f88c251ef286b511ae /src/zencore/compress.cpp
parentMerge branch 'main' of https://github.com/EpicGames/zen (diff)
downloadzen-d1f7e8a8f9aed001bb7c5dd653ee2678d2bffaf3.tar.xz
zen-d1f7e8a8f9aed001bb7c5dd653ee2678d2bffaf3.zip
header only compressed buffers are valid (#604)
- Bugfix: Allow attachments that contains a raw size of zero
Diffstat (limited to 'src/zencore/compress.cpp')
-rw-r--r--src/zencore/compress.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zencore/compress.cpp b/src/zencore/compress.cpp
index 2362d8e78..c41bdac42 100644
--- a/src/zencore/compress.cpp
+++ b/src/zencore/compress.cpp
@@ -1268,7 +1268,7 @@ CompressedBuffer::FromCompressed(SharedBuffer&& InCompressedData, IoHash& OutRaw
CompressedBuffer
CompressedBuffer::FromCompressedNoValidate(IoBuffer&& InCompressedData)
{
- if (InCompressedData.GetSize() <= sizeof(detail::BufferHeader))
+ if (InCompressedData.GetSize() < sizeof(detail::BufferHeader))
{
return CompressedBuffer();
}
@@ -1280,7 +1280,7 @@ CompressedBuffer::FromCompressedNoValidate(IoBuffer&& InCompressedData)
CompressedBuffer
CompressedBuffer::FromCompressedNoValidate(CompositeBuffer&& InCompressedData)
{
- if (InCompressedData.GetSize() <= sizeof(detail::BufferHeader))
+ if (InCompressedData.GetSize() < sizeof(detail::BufferHeader))
{
return CompressedBuffer();
}