diff options
author | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-06-29 13:30:28 +1000 |
---|---|---|
committer | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-06-29 17:23:24 +1000 |
commit | 4234ca3bf2c87d01026b3d003f6e5b4d1ec5b7df (patch) | |
tree | 60504564d65867e6af721d93e76912a1c1045261 /src/common/backtrace.h | |
parent | 2e51608a8b7d883f5e187ccc83ed871e248442c2 (diff) | |
download | tor-4234ca3bf2c87d01026b3d003f6e5b4d1ec5b7df.tar.gz tor-4234ca3bf2c87d01026b3d003f6e5b4d1ec5b7df.zip |
Improve overflow checks in tv_udiff and tv_mdiff
Validate that tv_usec inputs to tv_udiff and tv_mdiff are in range.
Do internal calculations in tv_udiff and tv_mdiff in 64-bit,
which makes the function less prone to integer overflow,
particularly on platforms where long and time_t are 32-bit,
but tv_sec is 64-bit, like some BSD configurations.
Check every addition and subtraction that could overflow.
Diffstat (limited to 'src/common/backtrace.h')
0 files changed, 0 insertions, 0 deletions