[FFmpeg-devel] [PATCH 3/3] avfilter/f_setcmd: fix null pointer dereference on using dash as interval
Marton Balint
cus at passwd.hu
Thu Feb 9 01:23:25 EET 2017
Fixes Coverity CID 1396259.
Signed-off-by: Marton Balint <cus at passwd.hu>
---
libavfilter/f_sendcmd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c
index fb30220..ce21369 100644
--- a/libavfilter/f_sendcmd.c
+++ b/libavfilter/f_sendcmd.c
@@ -268,6 +268,12 @@ static int parse_interval(Interval *interval, int interval_count,
char *start, *end;
start = av_strtok(intervalstr, "-", &end);
+ if (!start) {
+ 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",
--
2.10.2
More information about the ffmpeg-devel
mailing list