Browse Source

avfilter/af_pan: fix null pointer dereference on empty token

Fixes Coverity CID 1396254.

Signed-off-by: Marton Balint <cus@passwd.hu>
tags/n3.3
Marton Balint 8 years ago
parent
commit
e57fd926b0
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavfilter/af_pan.c

+ 5
- 0
libavfilter/af_pan.c View File

@@ -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)


Loading…
Cancel
Save