aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/fuzz/script_flags.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/test/fuzz/script_flags.cpp b/src/test/fuzz/script_flags.cpp
index 3b8f5c068d..accb32f1cc 100644
--- a/src/test/fuzz/script_flags.cpp
+++ b/src/test/fuzz/script_flags.cpp
@@ -3,25 +3,22 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <consensus/amount.h>
-#include <pubkey.h>
+#include <primitives/transaction.h>
#include <script/interpreter.h>
+#include <serialize.h>
#include <streams.h>
+#include <test/fuzz/fuzz.h>
#include <test/util/script.h>
-#include <version.h>
-#include <test/fuzz/fuzz.h>
+#include <cassert>
+#include <ios>
+#include <utility>
+#include <vector>
FUZZ_TARGET(script_flags)
{
- CDataStream ds(buffer, SER_NETWORK, INIT_PROTO_VERSION);
- try {
- int nVersion;
- ds >> nVersion;
- ds.SetVersion(nVersion);
- } catch (const std::ios_base::failure&) {
- return;
- }
-
+ if (buffer.size() > 100'000) return;
+ DataStream ds{buffer};
try {
const CTransaction tx(deserialize, TX_WITH_WITNESS, ds);