Skip to content

Commit aa2ce2d

Browse files
committed
Merge bitcoin/bitcoin#30307: fuzz: Fix wallet_bdb_parser 32-bit unhandled fseek error
fa7bc9b 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 fa7bc9b brunoerg: utACK fa7bc9b Tree-SHA512: 7a752a005837bae6846ce315a7b3b1a5fe1f440c7797c750f2c0bbb20b1ef1537cd390c425747c0c85d012655e2f908bd300ea084f82e5ada19badbf826e1ec9
2 parents c6de072 + fa7bc9b commit aa2ce2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/wallet/test/fuzz/wallet_bdb_parser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2023 The Bitcoin Core developers
1+
// Copyright (c) 2023-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

@@ -63,6 +63,7 @@ FUZZ_TARGET(wallet_bdb_parser, .init = initialize_wallet_bdb_parser)
6363
#endif
6464
if (error.original.starts_with("AutoFile::ignore: end of file") ||
6565
error.original.starts_with("AutoFile::read: end of file") ||
66+
error.original.starts_with("AutoFile::seek: ") ||
6667
error.original == "Not a BDB file" ||
6768
error.original == "Unexpected page type, should be 9 (BTree Metadata)" ||
6869
error.original == "Unexpected database flags, should only be 0x20 (subdatabases)" ||

0 commit comments

Comments
 (0)