summaryrefslogtreecommitdiff
path: root/libavfilter/f_sendcmd.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2017-02-09 00:03:21 +0100
committerMarton Balint <cus@passwd.hu>2017-02-19 16:43:53 +0100
commita9f3e4b138fc14f7512fde821c051fe1ff7f124f (patch)
treeaf15d62a985e721937b6a45ec5929e3b5d4ae2f8 /libavfilter/f_sendcmd.c
parent4556dad2b7379a527134db519ab60111abefaf10 (diff)
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>
Diffstat (limited to 'libavfilter/f_sendcmd.c')
-rw-r--r--libavfilter/f_sendcmd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c
index fb30220e7c..522d6adb90 100644
--- a/libavfilter/f_sendcmd.c
+++ b/libavfilter/f_sendcmd.c
@@ -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",