diff options
author | Benety Goh <benety@mongodb.com> | 2021-10-12 14:42:14 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-12 19:46:23 +0000 |
commit | 00aa22ab28eca149b203636887df3f425662889c (patch) | |
tree | 6c0905bf621895483edaa7603e3b922b31a774c2 /src/mongo/db/index | |
parent | 874533f4882930e9c83a200f55d221ba29320f35 (diff) | |
download | mongo-00aa22ab28eca149b203636887df3f425662889c.tar.gz |
SERVER-60607 S2AccessMethod handles NaN/out of range values when extracting geo index version
Diffstat (limited to 'src/mongo/db/index')
-rw-r--r-- | src/mongo/db/index/s2_access_method.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/index/s2_access_method.cpp b/src/mongo/db/index/s2_access_method.cpp index 670ff95223c..e59485fb7e2 100644 --- a/src/mongo/db/index/s2_access_method.cpp +++ b/src/mongo/db/index/s2_access_method.cpp @@ -114,7 +114,7 @@ StatusWith<BSONObj> S2AccessMethod::fixSpec(const BSONObj& specObj) { << S2_INDEX_VERSION_3 << "] are supported"}; } - const auto indexVersion = indexVersionElt.numberLong(); + const auto indexVersion = indexVersionElt.safeNumberLong(); if (indexVersion != S2_INDEX_VERSION_1 && indexVersion != S2_INDEX_VERSION_2 && indexVersion != S2_INDEX_VERSION_3) { return {ErrorCodes::CannotCreateIndex, |