Commit a9f3e4b1 authored by Marton Balint's avatar Marton Balint

avfilter/f_setcmd: fix null pointer dereference on using dash as interval

Fixes Coverity CID 1396259.
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 4556dad2
......@@ -268,6 +268,13 @@ static int parse_interval(Interval *interval, int interval_count,
char *start, *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) {
av_log(log_ctx, AV_LOG_ERROR,
"Invalid start time specification '%s' in interval #%d\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment