diff options
author | Mathias Stearn <mathias@10gen.com> | 2017-03-31 14:43:28 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2017-04-12 08:57:12 -0400 |
commit | e502d0256ec27fdc645c7ae28d2c3ef7eab364db (patch) | |
tree | 18624612ed1f19e5c135a208108986bb2d011b19 /src/mongo/bson/bsonobjbuilder.h | |
parent | 4cefd9e258b71ad13a1b992f24c96417e588c45f (diff) | |
download | mongo-e502d0256ec27fdc645c7ae28d2c3ef7eab364db.tar.gz |
SERVER-28508 Tighten invariant in BSONObjBuilder resume constructor
Diffstat (limited to 'src/mongo/bson/bsonobjbuilder.h')
-rw-r--r-- | src/mongo/bson/bsonobjbuilder.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/bson/bsonobjbuilder.h b/src/mongo/bson/bsonobjbuilder.h index 835fe4e8312..4840a0f7210 100644 --- a/src/mongo/bson/bsonobjbuilder.h +++ b/src/mongo/bson/bsonobjbuilder.h @@ -104,7 +104,7 @@ public: _s(this), _tracker(nullptr), _doneCalled(false) { - invariant(_b.len() >= BSONObj::kMinBSONLength); + invariant(_b.len() - offset >= BSONObj::kMinBSONLength); _b.setlen(_b.len() - 1); // get rid of the previous EOO. // Reserve space for our EOO. _b.reserveBytes(1); |