Message ID | 20200813200341.2820-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 8931c55789a69f717b4a6954c5bb7acf5475a134 |
Headers | show |
Series | [FFmpeg-devel] avformat/siff: Reject audio packets without audio stream | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On 8/13/20, Michael Niedermayer <michael@niedermayer.cc> wrote: > Fixes: Assertion failure > Fixes: > 24612/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6600899842277376.fuzz > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavformat/siff.c | 2 ++ > 1 file changed, 2 insertions(+) > LGTM
On Wed, Aug 19, 2020 at 09:36:38PM +0200, Paul B Mahol wrote: > On 8/13/20, Michael Niedermayer <michael@niedermayer.cc> wrote: > > Fixes: Assertion failure > > Fixes: > > 24612/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6600899842277376.fuzz > > > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > > --- > > libavformat/siff.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > LGTM will apply thx [...]
diff --git a/libavformat/siff.c b/libavformat/siff.c index f6815b2f26..60a867df14 100644 --- a/libavformat/siff.c +++ b/libavformat/siff.c @@ -201,6 +201,8 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt) if (c->curstrm == -1) { c->pktsize = avio_rl32(s->pb) - 4; c->flags = avio_rl16(s->pb); + if (c->flags & VB_HAS_AUDIO && !c->has_audio) + return AVERROR_INVALIDDATA; c->gmcsize = (c->flags & VB_HAS_GMC) ? 4 : 0; if (c->gmcsize) avio_read(s->pb, c->gmc, c->gmcsize);
Fixes: Assertion failure Fixes: 24612/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6600899842277376.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/siff.c | 2 ++ 1 file changed, 2 insertions(+)