Message ID | 20200328001733.695-1-lance.lmwang@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [FFmpeg-devel,v2,1/3] avfilter/af_acrossover: Check sscanf() return value | expand |
Context | Check | Description |
---|---|---|
andriy/ffmpeg-patchwork | success | Make fate finished |
diff --git a/libavfilter/af_acrossover.c b/libavfilter/af_acrossover.c index f70c50b..91f77cc 100644 --- a/libavfilter/af_acrossover.c +++ b/libavfilter/af_acrossover.c @@ -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.\n"); + return AVERROR(EINVAL); + } if (freq <= 0) { av_log(ctx, AV_LOG_ERROR, "Frequency %f must be positive number.\n", freq); return AVERROR(EINVAL);