mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Fuzzers: Continue if frame is malformed in GIF fuzzer
This commit is contained in:
committed by
Andreas Kling
parent
4173a9880f
commit
45181e8eaf
@@ -30,9 +30,14 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
dbgln_if(GIF_DEBUG, "loop_count: {}", gif_decoder.loop_count());
|
||||
dbgln_if(GIF_DEBUG, "frame_count: {}", gif_decoder.frame_count());
|
||||
for (size_t i = 0; i < gif_decoder.frame_count(); ++i) {
|
||||
auto ifd = gif_decoder.frame(i).release_value_but_fixme_should_propagate_errors();
|
||||
dbgln_if(GIF_DEBUG, "frame #{} size: {}", i, ifd.image->size());
|
||||
dbgln_if(GIF_DEBUG, "frame #{} duration: {}", i, ifd.duration);
|
||||
auto ifd_or_error = gif_decoder.frame(i);
|
||||
if (ifd_or_error.is_error()) {
|
||||
dbgln_if(GIF_DEBUG, "frame #{} error: {}", i, ifd_or_error.release_error());
|
||||
} else {
|
||||
auto ifd = ifd_or_error.release_value();
|
||||
dbgln_if(GIF_DEBUG, "frame #{} size: {}", i, ifd.image->size());
|
||||
dbgln_if(GIF_DEBUG, "frame #{} duration: {}", i, ifd.duration);
|
||||
}
|
||||
}
|
||||
dbgln_if(GIF_DEBUG, "Done.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user