diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index 114b6c6564..e80956b3a8 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -639,6 +639,12 @@ static int concat_parse_script(AVFormatContext *avf) } } + if (file->inpoint != AV_NOPTS_VALUE && file->outpoint != AV_NOPTS_VALUE) { + if (file->inpoint > file->outpoint || + file->outpoint - (uint64_t)file->inpoint > INT64_MAX) + ret = AVERROR_INVALIDDATA; + } + fail: for (arg = 0; arg < MAX_ARGS; arg++) av_freep(&arg_str[arg]);