History

avfilter/af_acrossover: Check sscanf() return value

Limin Wang committed 6 years ago

Commit 403bee31 parent 24db9371 file · +4 −1Browse files

Unified · Split

libavfilter/af_acrossover.c+4−1
@@ -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);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t