summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2022-07-08 15:45:50 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-10 10:29:31 +0000
commit49b1ad9884fa093199f571be07bc9ea9cf2be665 (patch)
tree04067ece20ea949dad75b6722d7cdecbaba6b428 /src/mongo/s
parentf97eb26ed47f1974090361fc0bc0942f186e5439 (diff)
downloadmongo-49b1ad9884fa093199f571be07bc9ea9cf2be665.tar.gz
SERVER-67802 ensure mongos count can handle large values for limit
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/commands/cluster_count_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/s/commands/cluster_count_cmd.cpp b/src/mongo/s/commands/cluster_count_cmd.cpp
index bbee6e2f7be..539717d9de7 100644
--- a/src/mongo/s/commands/cluster_count_cmd.cpp
+++ b/src/mongo/s/commands/cluster_count_cmd.cpp
@@ -293,7 +293,7 @@ private:
}
if (l.isNumber()) {
- long long limit = l.numberLong();
+ auto limit = l.safeNumberLong();
if (limit < 0) {
limit = -limit;
}