HomePhabricator

Fixed overflow in GetPerformanceCounter()

Description

Fixed overflow in GetPerformanceCounter()

Summary: I ran UBSAN on the tests and this was one of the easier fixes. Bitcoin compiles as a 32-bit app and as such this usage ends up with an overflow. Note that this bug isn't super-critical as the GetPerformanceCounter() function is only used to seed random number generators, but it still is a bug nonetheless.

Test Plan: make check and rpc-tests.py

Reviewers: freetrader, deadalnix, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D472

Details

Provenance
CCulianuAuthored on Aug 15 2017, 01:50
CCulianuPushed on Aug 15 2017, 22:57
Reviewer
Restricted Project
Differential Revision
D472: Fixed overflow in GetPerformanceCounter()
Parents
rABCe8cacd37397a: Use std for make_pair in walletdb.cpp
Branches
Unknown
Tags
Unknown