mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/concatdec: Check file
Fixes: null pointer dereference
Fixes: -stream_loop 1 -ss 00:00:05 -i zgclab/ffmpeg_crash/poc2 -codec:v copy -codec:a aac -y output.mp4
Found-by: Wang Dawei and Zhou Geng, from Zhongguancun Laboratory
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a5d1497f33
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1cb422a0ad
commit
ff547f5fd4
|
@ -638,6 +638,11 @@ static int concat_parse_script(AVFormatContext *avf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!file) {
|
||||||
|
ret = AVERROR_INVALIDDATA;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
if (file->inpoint != AV_NOPTS_VALUE && file->outpoint != AV_NOPTS_VALUE) {
|
if (file->inpoint != AV_NOPTS_VALUE && file->outpoint != AV_NOPTS_VALUE) {
|
||||||
if (file->inpoint > file->outpoint ||
|
if (file->inpoint > file->outpoint ||
|
||||||
file->outpoint - (uint64_t)file->inpoint > INT64_MAX)
|
file->outpoint - (uint64_t)file->inpoint > INT64_MAX)
|
||||||
|
|
Loading…
Reference in New Issue