Commit 403bee30 authored by Limin Wang's avatar Limin Wang Committed by Paul B Mahol

avfilter/af_acrossover: Check sscanf() return value

Signed-off-by: 's avatarLimin Wang <lance.lmwang@gmail.com>
parent 24db9372
...@@ -99,7 +99,10 @@ static av_cold int init(AVFilterContext *ctx) ...@@ -99,7 +99,10 @@ static av_cold int init(AVFilterContext *ctx)
p = NULL; 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) { if (freq <= 0) {
av_log(ctx, AV_LOG_ERROR, "Frequency %f must be positive number.\n", freq); av_log(ctx, AV_LOG_ERROR, "Frequency %f must be positive number.\n", freq);
return AVERROR(EINVAL); return AVERROR(EINVAL);
......
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