summaryrefslogtreecommitdiff
path: root/Meta/Lagom
diff options
context:
space:
mode:
Diffstat (limited to 'Meta/Lagom')
-rw-r--r--Meta/Lagom/Fuzzers/FuzzBrotli.cpp6
-rw-r--r--Meta/Lagom/Fuzzers/FuzzDeflateCompression.cpp4
-rw-r--r--Meta/Lagom/Fuzzers/FuzzDeflateDecompression.cpp4
-rw-r--r--Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp2
-rw-r--r--Meta/Lagom/Fuzzers/FuzzGzipCompression.cpp4
-rw-r--r--Meta/Lagom/Fuzzers/FuzzGzipDecompression.cpp2
-rw-r--r--Meta/Lagom/Fuzzers/FuzzHttpRequest.cpp2
-rw-r--r--Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp2
-rw-r--r--Meta/Lagom/Fuzzers/FuzzMatroskaReader.cpp8
-rw-r--r--Meta/Lagom/Fuzzers/FuzzVP9Decoder.cpp3
-rw-r--r--Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp2
-rw-r--r--Meta/Lagom/Fuzzers/FuzzZlibDecompression.cpp4
12 files changed, 20 insertions, 23 deletions
diff --git a/Meta/Lagom/Fuzzers/FuzzBrotli.cpp b/Meta/Lagom/Fuzzers/FuzzBrotli.cpp
index bd3aa2071f..02f57cb2e3 100644
--- a/Meta/Lagom/Fuzzers/FuzzBrotli.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzBrotli.cpp
@@ -13,12 +13,12 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
auto bufstream_result = Core::Stream::MemoryStream::construct({ data, size });
if (bufstream_result.is_error()) {
dbgln("MemoryStream::construct() failed.");
- return 1;
+ return 0;
}
auto bufstream = bufstream_result.release_value();
auto brotli_stream = Compress::BrotliDecompressionStream { *bufstream };
- auto uncompressed = brotli_stream.read_all();
- return uncompressed.is_error();
+ (void)brotli_stream.read_all();
+ return 0;
}
diff --git a/Meta/Lagom/Fuzzers/FuzzDeflateCompression.cpp b/Meta/Lagom/Fuzzers/FuzzDeflateCompression.cpp
index 8e21aa96be..5399b63b76 100644
--- a/Meta/Lagom/Fuzzers/FuzzDeflateCompression.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzDeflateCompression.cpp
@@ -9,6 +9,6 @@
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
- auto result = Compress::DeflateCompressor::compress_all(ReadonlyBytes { data, size });
- return result.has_value();
+ (void)Compress::DeflateCompressor::compress_all(ReadonlyBytes { data, size });
+ return 0;
}
diff --git a/Meta/Lagom/Fuzzers/FuzzDeflateDecompression.cpp b/Meta/Lagom/Fuzzers/FuzzDeflateDecompression.cpp
index b1167f2527..bbaf59d5d1 100644
--- a/Meta/Lagom/Fuzzers/FuzzDeflateDecompression.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzDeflateDecompression.cpp
@@ -9,6 +9,6 @@
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
- auto result = Compress::DeflateDecompressor::decompress_all(ReadonlyBytes { data, size });
- return result.has_value();
+ (void)Compress::DeflateDecompressor::decompress_all(ReadonlyBytes { data, size });
+ return 0;
}
diff --git a/Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp b/Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp
index 2f393e0c3b..9e1b19769a 100644
--- a/Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp
@@ -21,7 +21,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
for (;;) {
auto samples = flac->get_more_samples();
if (samples.is_error())
- return 2;
+ return 0;
if (samples.value().size() > 0)
break;
}
diff --git a/Meta/Lagom/Fuzzers/FuzzGzipCompression.cpp b/Meta/Lagom/Fuzzers/FuzzGzipCompression.cpp
index db2f23078a..a43d70f2f3 100644
--- a/Meta/Lagom/Fuzzers/FuzzGzipCompression.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzGzipCompression.cpp
@@ -9,6 +9,6 @@
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
- auto result = Compress::GzipCompressor::compress_all(ReadonlyBytes { data, size });
- return result.has_value();
+ (void)Compress::GzipCompressor::compress_all(ReadonlyBytes { data, size });
+ return 0;
}
diff --git a/Meta/Lagom/Fuzzers/FuzzGzipDecompression.cpp b/Meta/Lagom/Fuzzers/FuzzGzipDecompression.cpp
index 580ef03e41..716aa229e8 100644
--- a/Meta/Lagom/Fuzzers/FuzzGzipDecompression.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzGzipDecompression.cpp
@@ -9,6 +9,6 @@
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
- auto result = Compress::GzipDecompressor::decompress_all(ReadonlyBytes { data, size });
+ (void)Compress::GzipDecompressor::decompress_all(ReadonlyBytes { data, size });
return 0;
}
diff --git a/Meta/Lagom/Fuzzers/FuzzHttpRequest.cpp b/Meta/Lagom/Fuzzers/FuzzHttpRequest.cpp
index a16f5170c1..5800767379 100644
--- a/Meta/Lagom/Fuzzers/FuzzHttpRequest.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzHttpRequest.cpp
@@ -12,7 +12,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
auto request_wrapper = HTTP::HttpRequest::from_raw_request(ReadonlyBytes { data, size });
if (!request_wrapper.has_value())
- return 1;
+ return 0;
auto& request = request_wrapper.value();
VERIFY(request.method() != HTTP::HttpRequest::Method::Invalid);
diff --git a/Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp b/Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp
index a3f9ba90cb..1dc1cdc3e3 100644
--- a/Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp
@@ -21,7 +21,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
for (;;) {
auto samples = mp3->get_more_samples();
if (samples.is_error())
- return 2;
+ return 0;
if (samples.value().size() > 0)
break;
}
diff --git a/Meta/Lagom/Fuzzers/FuzzMatroskaReader.cpp b/Meta/Lagom/Fuzzers/FuzzMatroskaReader.cpp
index 762a7032f4..2272b8c107 100644
--- a/Meta/Lagom/Fuzzers/FuzzMatroskaReader.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzMatroskaReader.cpp
@@ -11,10 +11,8 @@ extern "C" int LLVMFuzzerTestOneInput(u8 const* data, size_t size)
{
auto matroska_reader_result = Video::Matroska::Reader::from_data({ data, size });
if (matroska_reader_result.is_error())
- return -1;
- if (auto result = matroska_reader_result.value().segment_information(); result.is_error())
- return -1;
- if (auto result = matroska_reader_result.value().track_count(); result.is_error())
- return -1;
+ return 0;
+ (void)matroska_reader_result.value().segment_information();
+ (void)matroska_reader_result.value().track_count();
return 0;
}
diff --git a/Meta/Lagom/Fuzzers/FuzzVP9Decoder.cpp b/Meta/Lagom/Fuzzers/FuzzVP9Decoder.cpp
index 506b8c4ab5..ecd5327693 100644
--- a/Meta/Lagom/Fuzzers/FuzzVP9Decoder.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzVP9Decoder.cpp
@@ -10,7 +10,6 @@
extern "C" int LLVMFuzzerTestOneInput(u8 const* data, size_t size)
{
Video::VP9::Decoder vp9_decoder;
- if (auto decode_error = vp9_decoder.receive_sample({ data, size }); decode_error.is_error())
- return -1;
+ (void)vp9_decoder.receive_sample({ data, size });
return 0;
}
diff --git a/Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp b/Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp
index 8e589b21b7..49ee6c4a32 100644
--- a/Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp
@@ -23,7 +23,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
for (;;) {
auto samples = wav->get_more_samples();
if (samples.is_error())
- return 2;
+ return 0;
if (samples.value().size() > 0)
break;
}
diff --git a/Meta/Lagom/Fuzzers/FuzzZlibDecompression.cpp b/Meta/Lagom/Fuzzers/FuzzZlibDecompression.cpp
index 19a535931a..e71098494c 100644
--- a/Meta/Lagom/Fuzzers/FuzzZlibDecompression.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzZlibDecompression.cpp
@@ -9,6 +9,6 @@
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
- auto result = Compress::Zlib::decompress_all(ReadonlyBytes { data, size });
- return result.has_value();
+ (void)Compress::Zlib::decompress_all(ReadonlyBytes { data, size });
+ return 0;
}