// Copyright (c) 2020 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include #include #include #include #include #include #include #include FUZZ_TARGET(flatfile) { FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); std::optional flat_file_pos = ConsumeDeserializable(fuzzed_data_provider); if (!flat_file_pos) { return; } std::optional another_flat_file_pos = ConsumeDeserializable(fuzzed_data_provider); if (another_flat_file_pos) { assert((*flat_file_pos == *another_flat_file_pos) != (*flat_file_pos != *another_flat_file_pos)); } (void)flat_file_pos->ToString(); flat_file_pos->SetNull(); assert(flat_file_pos->IsNull()); }