History

avfilter/af_acrossover: Check sscanf() return value

Limin Wang committed 6 years ago

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

Showing the changes to libavfilter/af_acrossover.c (1 of 1 file). Show all

Unified · Split

libavfilter/af_acrossover.c+4−1
@@ -99,7 +99,10 @@ static av_cold int init(AVFilterContext *ctx) · 98 unmodified lines
9999
100100 p = NULL;
101101
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+ }
103106 if (freq <= 0) {
104107 av_log(ctx, AV_LOG_ERROR, "Frequency %f must be positive number.\n", freq);
105108 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