mirror of https://gitee.com/bigwinds/arangodb
Fix a buffer overflow that did not have any effect.
This commit is contained in:
parent
2a03393121
commit
0445b547be
|
@ -78,12 +78,14 @@ AggregatorGroup::~AggregatorGroup () {
|
||||||
void AggregatorGroup::initialize (size_t capacity) {
|
void AggregatorGroup::initialize (size_t capacity) {
|
||||||
TRI_ASSERT(capacity > 0);
|
TRI_ASSERT(capacity > 0);
|
||||||
|
|
||||||
|
groupValues.clear();
|
||||||
|
collections.clear();
|
||||||
groupValues.reserve(capacity);
|
groupValues.reserve(capacity);
|
||||||
collections.reserve(capacity);
|
collections.reserve(capacity);
|
||||||
|
|
||||||
for (size_t i = 0; i < capacity; ++i) {
|
for (size_t i = 0; i < capacity; ++i) {
|
||||||
groupValues[i] = AqlValue();
|
groupValues.emplace_back();
|
||||||
collections[i] = nullptr;
|
collections.push_back(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue