aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/zencore/compress.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e5a1b0d1..cf51e9f19 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@
- Bugfix: CasContainerStrategy::ReadIndexFile issue could cause CAS items to not be found after a shutdown/restart cycle
- Bugfix: Make sure we don't hold the namespace bucket lock when we create buckets to avoid deadlock
- Bugfix: Make sure that PathFromHandle don't hide true error when throwing exceptions
+- Bugfix: Allow attachments that contains a raw size of zero
- Improvement: The frontend html content is no longer appended at the end of the executable which prevented signing, instead it is compiled in from the `/src/zenserver/frontend/html.zip` archive
- Improvement: MacOS now does ad-hoc code signing by default when issuing `xmake bundle`, signing with proper cert is done on CI builds
- Improvement: Updated branding to be consistent with current working name ("Unreal Zen Storage Server" etc)
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();
}