mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/f_setcmd: fix null pointer dereference on using dash as interval
Fixes Coverity CID 1396259. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
4556dad2b7
commit
a9f3e4b138
|
@ -268,6 +268,13 @@ static int parse_interval(Interval *interval, int interval_count,
|
||||||
char *start, *end;
|
char *start, *end;
|
||||||
|
|
||||||
start = av_strtok(intervalstr, "-", &end);
|
start = av_strtok(intervalstr, "-", &end);
|
||||||
|
if (!start) {
|
||||||
|
ret = AVERROR(EINVAL);
|
||||||
|
av_log(log_ctx, AV_LOG_ERROR,
|
||||||
|
"Invalid interval specification '%s' in interval #%d\n",
|
||||||
|
intervalstr, interval_count);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
if ((ret = av_parse_time(&interval->start_ts, start, 1)) < 0) {
|
if ((ret = av_parse_time(&interval->start_ts, start, 1)) < 0) {
|
||||||
av_log(log_ctx, AV_LOG_ERROR,
|
av_log(log_ctx, AV_LOG_ERROR,
|
||||||
"Invalid start time specification '%s' in interval #%d\n",
|
"Invalid start time specification '%s' in interval #%d\n",
|
||||||
|
|
Loading…
Reference in New Issue