From 0445b547be07a0271330de5f5d80d3f931f92a16 Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Fri, 28 Nov 2014 13:31:27 +0100 Subject: [PATCH] Fix a buffer overflow that did not have any effect. --- arangod/Aql/ExecutionBlock.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arangod/Aql/ExecutionBlock.cpp b/arangod/Aql/ExecutionBlock.cpp index 97d48a4fc8..7e9d8d5001 100644 --- a/arangod/Aql/ExecutionBlock.cpp +++ b/arangod/Aql/ExecutionBlock.cpp @@ -78,12 +78,14 @@ AggregatorGroup::~AggregatorGroup () { void AggregatorGroup::initialize (size_t capacity) { TRI_ASSERT(capacity > 0); + groupValues.clear(); + collections.clear(); groupValues.reserve(capacity); collections.reserve(capacity); for (size_t i = 0; i < capacity; ++i) { - groupValues[i] = AqlValue(); - collections[i] = nullptr; + groupValues.emplace_back(); + collections.push_back(nullptr); } }