diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-04-30 00:47:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-09 16:17:39 +0200 |
commit | a5d1497f33afa17b6a3578b66638e69bf8a558de (patch) | |
tree | 6f6b08b244741cf23d2d7afcc78121f0c6cd9f2d /libavformat | |
parent | 24bd01ea65eb5a9902a0ce8e38f82dcec7117f87 (diff) | |
download | ffmpeg-a5d1497f33afa17b6a3578b66638e69bf8a558de.tar.gz |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/concatdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index 493659649c..fe65d0c768 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -639,6 +639,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 > file->outpoint || file->outpoint - (uint64_t)file->inpoint > INT64_MAX) |