Skip to content

Commit fa80b16

Browse files
author
MarcoFalke
committed
fuzz: Limit parse_univalue input length
1 parent ec74f45 commit fa80b16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/fuzz/parse_univalue.cpp

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

@@ -77,7 +77,7 @@ FUZZ_TARGET(parse_univalue, .init = initialize_parse_univalue)
7777
}
7878
try {
7979
FlatSigningProvider provider;
80-
(void)EvalDescriptorStringOrObject(univalue, provider);
80+
if (buffer.size() < 10'000) (void)EvalDescriptorStringOrObject(univalue, provider);
8181
} catch (const UniValue&) {
8282
} catch (const std::runtime_error&) {
8383
}

0 commit comments

Comments
 (0)