summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2017-02-05 02:25:04 +0100
committerMarton Balint <cus@passwd.hu>2017-02-05 22:49:04 +0100
commite57fd926b09156fd8da42876e8946490025c47d4 (patch)
tree2e932536fa173284b26247023edde7516abc8ed9 /libavfilter
parent326b1ed93e25f2b2d505ee88325fabb190d8c275 (diff)
avfilter/af_pan: fix null pointer dereference on empty token
Fixes Coverity CID 1396254. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_pan.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
index 94f15876f5..a477bde460 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, "Channel layout not specified\n");
+ ret = AVERROR(EINVAL);
+ goto fail;
+ }
ret = ff_parse_channel_layout(&pan->out_channel_layout,
&pan->nb_output_channels, arg, ctx);
if (ret < 0)