Showing the changes to libavfilter/af_acrossover.c (1 of 1 file). Show all
Unified · Split
| @@ -99,7 +99,10 @@ static av_cold int init(AVFilterContext *ctx) · 98 unmodified lines | ||
| 99 | 99 | |
| 100 | 100 | p = NULL; |
| 101 | 101 | |
| 102 | − av_sscanf(arg, "%f", &freq); | |
| 102 | + if (av_sscanf(arg, "%f", &freq) != 1) { | |
| 103 | + av_log(ctx, AV_LOG_ERROR, "Invalid syntax for frequency[%d].\n", i); | |
| 104 | + return AVERROR(EINVAL); | |
| 105 | + } | |
| 103 | 106 | if (freq <= 0) { |
| 104 | 107 | av_log(ctx, AV_LOG_ERROR, "Frequency %f must be positive number.\n", freq); |
| 105 | 108 | return AVERROR(EINVAL); |