mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-30 04:32:21 +02:00
Merge bitcoin/bitcoin#30307: fuzz: Fix wallet_bdb_parser 32-bit unhandled fseek error
fa7bc9bbca9348cf31b97bee0789ea7caeec635c fuzz: Fix wallet_bdb_parser 32-bit unhandled fseek error (MarcoFalke) Pull request description: `std::fseek` on 64-bit past the end of the file may work fine (the following read would fail). However, on 32-bit it may fail early. Fix it, by ignoring the error, treating it similar to a read error. This was found by OSS-Fuzz. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=69414 ACKs for top commit: TheCharlatan: ACK fa7bc9bbca9348cf31b97bee0789ea7caeec635c brunoerg: utACK fa7bc9bbca9348cf31b97bee0789ea7caeec635c Tree-SHA512: 7a752a005837bae6846ce315a7b3b1a5fe1f440c7797c750f2c0bbb20b1ef1537cd390c425747c0c85d012655e2f908bd300ea084f82e5ada19badbf826e1ec9
This commit is contained in:
commit
aa2ce2d646
@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2023 The Bitcoin Core developers
|
||||
// Copyright (c) 2023-present The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@ -63,6 +63,7 @@ FUZZ_TARGET(wallet_bdb_parser, .init = initialize_wallet_bdb_parser)
|
||||
#endif
|
||||
if (error.original.starts_with("AutoFile::ignore: end of file") ||
|
||||
error.original.starts_with("AutoFile::read: end of file") ||
|
||||
error.original.starts_with("AutoFile::seek: ") ||
|
||||
error.original == "Not a BDB file" ||
|
||||
error.original == "Unexpected page type, should be 9 (BTree Metadata)" ||
|
||||
error.original == "Unexpected database flags, should only be 0x20 (subdatabases)" ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user