Commit e57fd926 authored by Marton Balint's avatar Marton Balint

avfilter/af_pan: fix null pointer dereference on empty token

Fixes Coverity CID 1396254.
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 326b1ed9
...@@ -115,6 +115,11 @@ static av_cold int init(AVFilterContext *ctx) ...@@ -115,6 +115,11 @@ static av_cold int init(AVFilterContext *ctx)
if (!args) if (!args)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
arg = av_strtok(args, "|", &tokenizer); 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, ret = ff_parse_channel_layout(&pan->out_channel_layout,
&pan->nb_output_channels, arg, ctx); &pan->nb_output_channels, arg, ctx);
if (ret < 0) if (ret < 0)
......
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