aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/cache/cachedisklayer.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-12-19 10:23:03 +0100
committerGitHub <[email protected]>2023-12-19 10:23:03 +0100
commitb9aa65cfa1495eb5899cecf50d32c6f5ca027ad8 (patch)
treefddd456c9782a57e7916703abdb53bf9e2be1af8 /src/zenserver/cache/cachedisklayer.cpp
parentfix leak in IoBuffer for manifested small chunk (#618) (diff)
downloadzen-b9aa65cfa1495eb5899cecf50d32c6f5ca027ad8.tar.xz
zen-b9aa65cfa1495eb5899cecf50d32c6f5ca027ad8.zip
fix ChunkIndexToChunkHash indexing (#621)
would previously index into a reserved-but-not-sized vector which is bad but not crash-inducing bad
Diffstat (limited to 'src/zenserver/cache/cachedisklayer.cpp')
-rw-r--r--src/zenserver/cache/cachedisklayer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zenserver/cache/cachedisklayer.cpp b/src/zenserver/cache/cachedisklayer.cpp
index fc6adb989..8d046105d 100644
--- a/src/zenserver/cache/cachedisklayer.cpp
+++ b/src/zenserver/cache/cachedisklayer.cpp
@@ -2307,7 +2307,7 @@ ZenCacheDiskLayer::CacheBucket::CollectGarbage(GcContext& GcCtx)
BlockStoreLocation Location = DiskLocation.GetBlockLocation(m_Configuration.PayloadAlignment);
size_t ChunkIndex = ChunkLocations.size();
ChunkLocations.push_back(Location);
- ChunkIndexToChunkHash[ChunkIndex] = Key;
+ ChunkIndexToChunkHash.push_back(Key);
if (ExpiredCacheKeys.contains(Key))
{
continue;