mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Meta: Return 0 from the fuzzing function in most cases
LibFuzzer documentation [1] states that all return values except for 0 and -1 are currently reserved for future use. -1 is a special return value that causes LibFuzzer to not add a testing input to the testing corpus, regardless of the code coverage that it causes. [1] https://llvm.org/docs/LibFuzzer.html
This commit is contained in:
committed by
Andrew Kaster
parent
eabb0be7ea
commit
20f0858f67
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user