History

avfilter/af_stereowiden: Check length

Fixes: out of array access Fixes: tickets/10746/poc13ffmpeg

Michael Niedermayer committed 2 years ago

Commit 50f0f8c1 parent ff451df1 file · +2 −0Browse files

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

Unified · Split

libavfilter/af_stereowiden.c+2−0
@@ -74,6 +74,8 @@ static int config_input(AVFilterLink *inlink) · 73 unmodified lines
74 74
75 s->length = lrintf(s->delay * inlink->sample_rate / 1000);75 s->length = lrintf(s->delay * inlink->sample_rate / 1000);
76 s->length *= 2;76 s->length *= 2;
77 if (s->length == 0)
78 return AVERROR(EINVAL);
77 s->buffer = av_calloc(s->length, sizeof(*s->buffer));79 s->buffer = av_calloc(s->length, sizeof(*s->buffer));
78 if (!s->buffer)80 if (!s->buffer)
79 return AVERROR(ENOMEM);81 return AVERROR(ENOMEM);

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