Browse Source

avfilter/af_acrossover: Check sscanf() return value

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
tags/n4.3
Limin Wang Paul B Mahol 5 years ago
parent
commit
403bee30a5
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavfilter/af_acrossover.c

+ 4
- 1
libavfilter/af_acrossover.c View File

@@ -99,7 +99,10 @@ static av_cold int init(AVFilterContext *ctx)

p = NULL;

av_sscanf(arg, "%f", &freq);
if (av_sscanf(arg, "%f", &freq) != 1) {
av_log(ctx, AV_LOG_ERROR, "Invalid syntax for frequency[%d].\n", i);
return AVERROR(EINVAL);
}
if (freq <= 0) {
av_log(ctx, AV_LOG_ERROR, "Frequency %f must be positive number.\n", freq);
return AVERROR(EINVAL);


Loading…
Cancel
Save