mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avformat/siff: Reject audio packets without audio stream
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 <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8931c55789
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8e729daf08
commit
18f85c4a93
@ -200,6 +200,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);
|
||||
|
Loading…
Reference in New Issue
Block a user