Commit 8bdba109 authored by Michael Niedermayer's avatar Michael Niedermayer

tools/target_dec_fuzzer: Only audio uses the return value to decode packets in...

tools/target_dec_fuzzer: Only audio uses the return value to decode packets in pieces, correct the code to match that

Fixes: Timeout
Fixes: 483/fuzz-0-ffmpeg_VIDEO_AV_CODEC_ID_H263I_fuzzer

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1df08cae
...@@ -186,6 +186,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ...@@ -186,6 +186,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (ret <= 0 || ret > avpkt.size) if (ret <= 0 || ret > avpkt.size)
break; break;
if (ctx->codec_type != AVMEDIA_TYPE_AUDIO)
ret = avpkt.size;
avpkt.data += ret; avpkt.data += ret;
avpkt.size -= ret; avpkt.size -= ret;
} }
......
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