summaryrefslogtreecommitdiff
path: root/Meta/Lagom/Fuzzers/FuzzWasmParser.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-01-30 11:05:43 +0100
committerLinus Groh <mail@linusgroh.de>2023-02-08 17:44:32 +0000
commit220fbcaa7e6ed087fa266b98a454ce1c06ea8100 (patch)
treeb155b42e299728dc672d2b5ce33b520a428cfb14 /Meta/Lagom/Fuzzers/FuzzWasmParser.cpp
parent8b2f23d0166ec9d21a70f10dadb2d7533a161079 (diff)
downloadserenity-220fbcaa7e6ed087fa266b98a454ce1c06ea8100.zip
AK: Remove the fallible constructor from `FixedMemoryStream`
Diffstat (limited to 'Meta/Lagom/Fuzzers/FuzzWasmParser.cpp')
-rw-r--r--Meta/Lagom/Fuzzers/FuzzWasmParser.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Meta/Lagom/Fuzzers/FuzzWasmParser.cpp b/Meta/Lagom/Fuzzers/FuzzWasmParser.cpp
index aaa4dfabca..7a677dd6d5 100644
--- a/Meta/Lagom/Fuzzers/FuzzWasmParser.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzWasmParser.cpp
@@ -12,10 +12,7 @@
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
ReadonlyBytes bytes { data, size };
- auto stream_or_error = FixedMemoryStream::construct(bytes);
- if (stream_or_error.is_error())
- return 0;
- auto stream = stream_or_error.release_value();
- [[maybe_unused]] auto result = Wasm::Module::parse(*stream);
+ FixedMemoryStream stream { bytes };
+ [[maybe_unused]] auto result = Wasm::Module::parse(stream);
return 0;
}