1
0
Fork 0

Fix a buffer overflow that did not have any effect.

This commit is contained in:
Max Neunhoeffer 2014-11-28 13:31:27 +01:00
parent 2a03393121
commit 0445b547be
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}
}