[FFmpeg-devel] [PATCH] avfilter/af_pan: fix null pointer dereference on empty token
Marton Balint
cus at passwd.hu
Sun Feb 5 03:27:20 EET 2017
Fixes Coverity CID 1396254.
Signed-off-by: Marton Balint <cus at passwd.hu>
---
libavfilter/af_pan.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
index 94f1587..00eef2b 100644
--- a/libavfilter/af_pan.c
+++ b/libavfilter/af_pan.c
@@ -115,6 +115,11 @@ static av_cold int init(AVFilterContext *ctx)
if (!args)
return AVERROR(ENOMEM);
arg = av_strtok(args, "|", &tokenizer);
+ if (!arg) {
+ av_log(ctx, AV_LOG_ERROR, "Cannot tokenize argument\n");
+ ret = AVERROR(EINVAL);
+ goto fail;
+ }
ret = ff_parse_channel_layout(&pan->out_channel_layout,
&pan->nb_output_channels, arg, ctx);
if (ret < 0)
--
2.10.2
More information about the ffmpeg-devel
mailing list