Skip to content

Commit 012ba47

Browse files
MarcoFalkeJaredTate
authored andcommitted
Merge bitcoin/bitcoin#23411: refactor: Avoid integer overflow in ApplyStats when activating snapshot
fa996c5 refactor: Avoid integer overflow in ApplyStats when activating snapshot (MarcoFalke) fac0188 Move AdditionOverflow to util, Add CheckedAdd with unit tests (MarcoFalke) fa526d8 Add dev doc to CCoinsStats::m_hash_type and make it const (MarcoFalke) faff051 style: Remove unused whitespace (MarcoFalke) Pull request description: A snapshot contains the utxo set, including the out value. To activate the snapshot, the hash needs to be calculated. As a side-effect, the total amount in the snapshot is calculated (as the sum of all out values), but never used. Instead of running into an integer overflow in an unused result, don't calculate the result in the first place. Other code paths (using the active utxo set) can not run into an integer overflow, since the active utxo set is valid. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39716 ACKs for top commit: shaavan: reACK fa996c5 vasild: ACK fa996c5 Tree-SHA512: 4f207f634841f6f634fd02ae1e5907e343fd767524fd0e8149aa99fa9a1834fe50167d14874834d45236e9c325d567925f28129bacb7d80be29cf22277a16a14
1 parent 970178e commit 012ba47

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

upgrade-tracking/commit-database.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,3 +425,4 @@ b1e8f0b96edf87b0ee68e85ea50c62e459ed8cb8,2021-12-08,fanquake,"guix: use uptream
425425
187dc1ec0c867ffcf44f607bbb928909d86a81ca,2021-12-15,fanquake,"build: use python-asn1crypto from upstream",success,none,automatic,upgrade-tracking/patches/success/187dc1ec0c867ffcf44f607bbb928909d86a81ca.patch,Clean cherry-pick
426426
84f9931cb44932751415f2ca48501ba01eed39a6,2021-12-30,fanquake,"guix: use upstream python-requests (2.26.0)",success,none,automatic,upgrade-tracking/patches/success/84f9931cb44932751415f2ca48501ba01eed39a6.patch,Clean cherry-pick
427427
45ed459f95d33a83f0c31c0c29dd585a70ab79ed,2022-01-05,MarcoFalke,"Merge bitcoin/bitcoin#23979: test: wait for rather than assert presence of file in startupnotify test",success,modified,patch-modifier,upgrade-tracking/patches/modified/45ed459f95d33a83f0c31c0c29dd585a70ab79ed.patch,Applied with DigiByte preservation
428+
e00e990606dc741f8500cc80243e44bb58de8045,2022-01-05,MarcoFalke,"Merge bitcoin/bitcoin#23978: test: use MiniWallet for mining_basic.py",success,modified,patch-modifier,upgrade-tracking/patches/modified/e00e990606dc741f8500cc80243e44bb58de8045.patch,Applied with DigiByte preservation
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
45ed459f95d33a83f0c31c0c29dd585a70ab79ed
1+
e00e990606dc741f8500cc80243e44bb58de8045

0 commit comments

Comments
 (0)