Commit c900f2e4 authored by Michael Niedermayer's avatar Michael Niedermayer

tools/target_dem_fuzzer: Check fmt before dereferencing

Fixes: NULL pointer dereference
Fixes: 44884/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4656748688965632

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 68bc9773
......@@ -173,7 +173,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
}
// HLS uses a loop with sleep, we thus must breakout or we timeout
if (!strcmp(fmt->name, "hls"))
if (fmt && !strcmp(fmt->name, "hls"))
interrupt_counter &= 31;
if (!io_buffer_size || size / io_buffer_size > maxblocks)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment