summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2021-12-22 17:00:11 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-12-22 17:45:00 +0000
commitdef38d38eeb3279243d2b6cd8e2d94a06b43cd3a (patch)
tree4c8f19fe09526aa310b42b97803c3575edb862e6
parentaf183c9e3f8f498c89440e28c949f4079ee37b39 (diff)
downloadmongo-def38d38eeb3279243d2b6cd8e2d94a06b43cd3a.tar.gz
SERVER-62225 FTSSpec::fixSpec() attempts to convert number outside the range of representable values of type 'int'
-rw-r--r--src/mongo/db/fts/fts_spec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/fts/fts_spec.cpp b/src/mongo/db/fts/fts_spec.cpp
index 2887faea908..04d36348511 100644
--- a/src/mongo/db/fts/fts_spec.cpp
+++ b/src/mongo/db/fts/fts_spec.cpp
@@ -485,7 +485,7 @@ StatusWith<BSONObj> FTSSpec::fixSpec(const BSONObj& spec) {
"text index option 'textIndexVersion' must be a number"};
}
- textIndexVersion = e.numberInt();
+ textIndexVersion = e.safeNumberInt();
if (textIndexVersion != TEXT_INDEX_VERSION_2 &&
textIndexVersion != TEXT_INDEX_VERSION_3) {
return {ErrorCodes::CannotCreateIndex,