Skip to content

Commit fab164f

Browse files
author
MarcoFalke
committed
fuzz: Avoid signed-integer-overflow in wallet_notifications fuzz target
1 parent 8cf2137 commit fab164f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wallet/test/fuzz/notifications.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2021-2022 The Bitcoin Core developers
1+
// Copyright (c) 2021-present The Bitcoin Core developers
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

@@ -169,7 +169,7 @@ FUZZ_TARGET(wallet_notifications, .init = initialize_setup)
169169
// The total amount, to be distributed to the wallets a and b in txs
170170
// without fee. Thus, the balance of the wallets should always equal the
171171
// total amount.
172-
const auto total_amount{ConsumeMoney(fuzzed_data_provider)};
172+
const auto total_amount{ConsumeMoney(fuzzed_data_provider, /*max=*/MAX_MONEY / 100000)};
173173
FuzzedWallet a{
174174
"fuzzed_wallet_a",
175175
"tprv8ZgxMBicQKsPd1QwsGgzfu2pcPYbBosZhJknqreRHgsWx32nNEhMjGQX2cgFL8n6wz9xdDYwLcs78N4nsCo32cxEX8RBtwGsEGgybLiQJfk",

0 commit comments

Comments
 (0)