diff options
author | Tim Schumacher <timschumi@gmx.de> | 2023-04-12 16:23:24 +0200 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-04-12 14:03:20 -0400 |
commit | ad60a0b522cede4bf95b7ea93660e9caf0e1930a (patch) | |
tree | ae9e4ec584b9182d3b739ade1095d9df886b11a5 | |
parent | 708387b850953dd49ff0e293be2da7f8370fc0da (diff) | |
download | serenity-ad60a0b522cede4bf95b7ea93660e9caf0e1930a.zip |
Fuzzers: Stop loading audio frames once the end is reached
Previously, the condition was reversed, so we would stop immediately on
a file that has at least one working chunk, and we would infinitely loop
on a file with no chunks.
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp | 2 | ||||
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp | 2 | ||||
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzQOALoader.cpp | 2 | ||||
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp b/Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp index 7c06c0e560..cdf9ad1f79 100644 --- a/Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp @@ -22,7 +22,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) auto samples = flac->load_chunks(10 * KiB); if (samples.is_error()) return 0; - if (samples.value().size() > 0) + if (samples.value().size() == 0) break; } diff --git a/Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp b/Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp index d871390718..a04d1391d0 100644 --- a/Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp @@ -22,7 +22,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) auto samples = mp3->load_chunks(1 * KiB); if (samples.is_error()) return 0; - if (samples.value().size() > 0) + if (samples.value().size() == 0) break; } diff --git a/Meta/Lagom/Fuzzers/FuzzQOALoader.cpp b/Meta/Lagom/Fuzzers/FuzzQOALoader.cpp index 52780971e9..a0c28cb5bb 100644 --- a/Meta/Lagom/Fuzzers/FuzzQOALoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzQOALoader.cpp @@ -22,7 +22,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) auto samples = qoa->load_chunks(5 * KiB); if (samples.is_error()) return 0; - if (samples.value().size() > 0) + if (samples.value().size() == 0) break; } diff --git a/Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp b/Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp index 1cdfa40777..ce910d2690 100644 --- a/Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp @@ -25,7 +25,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) auto samples = wav->load_chunks(4 * KiB); if (samples.is_error()) return 0; - if (samples.value().size() > 0) + if (samples.value().size() == 0) break; } |