diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2016-08-25 16:30:13 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2016-09-08 17:43:20 -0400 |
commit | e0591f59efcaf478ff47a1580d0dae9e875772f0 (patch) | |
tree | f5dbafa287cb106b612f623b2d388ddef9b64317 /src | |
parent | 527d403116591d1996040d7148f6b973fec05d87 (diff) | |
download | mongo-e0591f59efcaf478ff47a1580d0dae9e875772f0.tar.gz |
SERVER-25075 Limit BSONObj buffer size used by 2dsphere index.
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/index/expression_keys_private.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/index/expression_keys_private.cpp b/src/mongo/db/index/expression_keys_private.cpp index 6644e5015e1..5276f25943e 100644 --- a/src/mongo/db/index/expression_keys_private.cpp +++ b/src/mongo/db/index/expression_keys_private.cpp @@ -146,12 +146,12 @@ void getS2GeoKeys(const BSONObj& document, for (vector<string>::const_iterator it = cells.begin(); it != cells.end(); ++it) { BSONObjBuilder b; b.append("", *it); - out->insert(b.obj()); + out->insert(b.obj().copy()); } } if (0 == out->size()) { - BSONObjBuilder b; + BSONObjBuilder b(7); b.appendNull(""); out->insert(b.obj()); } |