diff options
author | Roman Kiryanov <rkir@google.com> | 2019-08-21 11:01:39 -0700 |
---|---|---|
committer | Roman Kiryanov <rkir@google.com> | 2019-08-21 11:01:39 -0700 |
commit | e9db937f4008f097f4ee9dc341a3afc219a96fd9 (patch) | |
tree | edb5e6f343a93d6ba38603621cd71e22bfaa542f /startop/scripts/lib/cmd_utils.py | |
parent | 95e7c023f51a61938c6e7e3e73355e03fda023b6 (diff) |
Fix integer overflow in make_timestamp_ns_locked
timespec::tv_sec is time_t which is 32bit wide on
32bit platforms. Multipliyng 32bit integers (tv_sec and
1000) produces another 32bit integer which overflows
in this case and turns into a negative value which
confuses the logic downstream. This change makes the
multiplication to be 64bit which prevent the overflow.
Bug: 139320584
Bug: 139538727
Test: GtsIncidentManagerTestCases
Change-Id: Ie956074961c7c1f08e2519920f7ce69d5c9e12d3
Signed-off-by: Roman Kiryanov <rkir@google.com>
Diffstat (limited to 'startop/scripts/lib/cmd_utils.py')
0 files changed, 0 insertions, 0 deletions