Showing the changes to libavfilter (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 | p = NULL; | 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 | if (freq <= 0) { | 106 | if (freq <= 0) { |
| 104 | av_log(ctx, AV_LOG_ERROR, "Frequency %f must be positive number.\n", freq); | 107 | av_log(ctx, AV_LOG_ERROR, "Frequency %f must be positive number.\n", freq); |
| 105 | return AVERROR(EINVAL); | 108 | return AVERROR(EINVAL); |