-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Client
-
Fully Compatible
-
ALL
-
Service Arch 2018-12-31
An integer overflow occurs, with the result converted to a wider integer type
Defect 105208 (STATIC_C)
Checker OVERFLOW_BEFORE_WIDEN (subcategory none)
File: /src/mongo/client/replica_set_monitor.cpp
Function mongo::ReplicaSetMonitor::SetState::SetState(mongo::StringData, const std::set<mongo::HostAndPort, std::less<mongo::HostAndPort>, std::allocator<mongo::HostAndPort>> &, mongo::executor::TaskExecutor *, mongo::MongoURI)
/src/mongo/client/replica_set_monitor.cpp, line: 1022
Potentially overflowing expression "mongo::serverGlobalParams.defaultLocalThresholdMillis * 1000" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "int64_t" (64 bits, signed).
latencyThresholdMicros(serverGlobalParams.defaultLocalThresholdMillis * 1000),