diff options
author | Geert Bosch <geert@mongodb.com> | 2020-09-04 11:12:36 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-09-08 20:14:20 +0000 |
commit | 121f2ba8052dcacd942e017391b3bfb1a6bc9ca6 (patch) | |
tree | dbe8e46504ca8a0033ecb809bed52110e4e37267 /src/mongo/bson/bson_validate.cpp | |
parent | 664c4ab229217f23041f9fdc2f5ecd8f5174c77e (diff) | |
download | mongo-121f2ba8052dcacd942e017391b3bfb1a6bc9ca6.tar.gz |
SERVER-50771 The BSONValidate fast path should support a depth of 32
Diffstat (limited to 'src/mongo/bson/bson_validate.cpp')
-rw-r--r-- | src/mongo/bson/bson_validate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/bson/bson_validate.cpp b/src/mongo/bson/bson_validate.cpp index 0fac3cbc0df..40e824a50fb 100644 --- a/src/mongo/bson/bson_validate.cpp +++ b/src/mongo/bson/bson_validate.cpp @@ -126,7 +126,7 @@ private: }; using Frames = - typename std::conditional<precise, std::vector<Frame>, std::array<Frame, 16>>::type; + typename std::conditional<precise, std::vector<Frame>, std::array<Frame, 32>>::type; struct Cursor { void skip(size_t len) { @@ -305,7 +305,7 @@ private: Status validateBSON(const char* originalBuffer, uint64_t maxLength) noexcept { // First try validating using the fast but less precise version. That version will return - // a not-OK status for objects with CodeWScope or nesting exceeding 16 levels. These cases and + // a not-OK status for objects with CodeWScope or nesting exceeding 32 levels. These cases and // actual failures will rerun the precise version that gives a detailed error context. if (MONGO_likely(ValidateBuffer<false>(originalBuffer, maxLength).validate().isOK())) return Status::OK(); |