mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/mov: Check STCO location
Fixes: bypassing of checks and assertion failure Fixes: asan_1003879.mp4 Found-by: Clusterfuzz + asan Reported-by: Thomas Guilbert <tguilbert@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 1cd41840208bce7e690a4ccc48077567418a0aa8) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e45920696c
commit
0f41c18963
@ -1971,6 +1971,10 @@ static int mov_read_stco(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
|||||||
MOVStreamContext *sc;
|
MOVStreamContext *sc;
|
||||||
unsigned int i, entries;
|
unsigned int i, entries;
|
||||||
|
|
||||||
|
if (c->trak_index < 0) {
|
||||||
|
av_log(c->fc, AV_LOG_WARNING, "STCO outside TRAK\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (c->fc->nb_streams < 1)
|
if (c->fc->nb_streams < 1)
|
||||||
return 0;
|
return 0;
|
||||||
st = c->fc->streams[c->fc->nb_streams-1];
|
st = c->fc->streams[c->fc->nb_streams-1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user