// Copyright (c) 2009-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 FUZZ_TARGET(parse_hd_keypath) { const std::string keypath_str(buffer.begin(), buffer.end()); std::vector keypath; (void)ParseHDKeypath(keypath_str, keypath); FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const std::vector random_keypath = ConsumeRandomLengthIntegralVector(fuzzed_data_provider); (void)FormatHDKeypath(random_keypath); (void)WriteHDKeypath(random_keypath); }