summaryrefslogtreecommitdiff
path: root/src/mongo/s/client/sharding_connection_hook.cpp
diff options
context:
space:
mode:
authorJason Carey <jcarey@argv.me>2016-02-17 19:16:59 -0500
committerJason Carey <jcarey@argv.me>2016-03-03 13:07:12 -0500
commit9778d0678715fc3f9b9f725cfd11ea85ce03b2fc (patch)
tree038d07f50634c208b9fe3187d2cb87169f609bd9 /src/mongo/s/client/sharding_connection_hook.cpp
parent8f451aa7e402b815f77db259611291744184e65c (diff)
downloadmongo-9778d0678715fc3f9b9f725cfd11ea85ce03b2fc.tar.gz
SERVER-22710 Fix UB in ASIO timeout durations
std::chrono types can naturally signed integer overflow if you accidentally pass a large duration in lower granularity (std::chrono::milliseconds::max()) to a higher granularity constructor (std::chrono::nanoseconds). We have to clamp our casts to ensure that we don't wrap around to negative values.
Diffstat (limited to 'src/mongo/s/client/sharding_connection_hook.cpp')
0 files changed, 0 insertions, 0 deletions