An integer overflow occurs, with the result converted to a wider integer type
Defect 98550 (STATIC_C)
Checker OVERFLOW_BEFORE_WIDEN (subcategory none)
File: /src/mongo/s/mongos_options.cpp
Function mongo::storeMongosOptions(const mongo::optionenvironment::Environment &, const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>> &)
/src/mongo/s/mongos_options.cpp, line: 218
Potentially overflowing expression "maxChunkSizeMB * 1024" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "uint64_t const" (64 bits, unsigned).
const uint64_t maxChunkSizeBytes = maxChunkSizeMB * 1024 * 1024;
- depends on
-
SERVER-23733 Remove the mongos chunkSize configuration option
- Closed