HomePhabricator

Fix a -Wstringop-overflow warning in wallet_tests

Description

Fix a -Wstringop-overflow warning in wallet_tests

Summary: The PollutePubKey() static function assumes the pubkey internal vector is not empty. Since this is not enforced it triggers a warning with GCC 14.1.1, which is fixed by a simple assert.

Test Plan:
With GCC:

ninja check-bitcoin-wallet_tests

Check there is no warning and the test passes.

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
FabienAuthored on Fri, Jun 14, 19:17
FabienPushed on Mon, Jun 17, 07:10
Reviewer
Restricted Project
Differential Revision
D16335: Fix a -Wstringop-overflow warning in wallet_tests
Parents
rABCdd128a6644b7: [Automated] Update seeds
Branches
Unknown
Tags
Unknown