Skip to content

Commit

Permalink
avformat/siff: Reject audio packets without audio stream
Browse files Browse the repository at this point in the history
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
Reviewed-by: Paul B Mahol <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Aug 20, 2020
1 parent 36f7b83 commit 8931c55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libavformat/siff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8931c55

Please sign in to comment.