aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/compactcas.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/zenstore/compactcas.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/zenstore/compactcas.cpp')
-rw-r--r--src/zenstore/compactcas.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zenstore/compactcas.cpp b/src/zenstore/compactcas.cpp
index c60f97a24..64c1dadf8 100644
--- a/src/zenstore/compactcas.cpp
+++ b/src/zenstore/compactcas.cpp
@@ -471,7 +471,7 @@ CasContainerStrategy::CollectGarbage(GcContext& GcCtx)
size_t ChunkIndex = ChunkLocations.size();
ChunkLocations.push_back(Location);
- ChunkIndexToChunkHash[ChunkIndex] = ChunkHash;
+ ChunkIndexToChunkHash.push_back(ChunkHash);
if (Keep)
{
KeepChunkIndexes.push_back(ChunkIndex);