aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2020-03-29 08:08:04 +0800
committerPaul B Mahol <onemda@gmail.com>2020-04-17 16:56:13 +0200
commit403bee30a57bfa77efebddcebc546df9d3876db2 (patch)
tree80a3d497b4853659730481d0fb93bfbbe330f805 /libavfilter
parent24db9372eb3a23ac76425ad8aa7affa7ae3501ec (diff)
downloadffmpeg-403bee30a57bfa77efebddcebc546df9d3876db2.tar.gz
avfilter/af_acrossover: Check sscanf() return value
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_acrossover.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/af_acrossover.c b/libavfilter/af_acrossover.c
index f70c50b3ed..002f378c3d 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 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);