diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2011-12-27 15:15:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-12 21:52:03 +0100 |
commit | c4cc8584d0e48a9474a52eed725ed726d14d3f2f (patch) | |
tree | db71f00e525f8894901ceaf4cd62ef69fb26f20c | |
parent | 1c1af2af0d6281a0bd6c503e3f2d2acefce698cc (diff) | |
download | ffmpeg-c4cc8584d0e48a9474a52eed725ed726d14d3f2f.tar.gz |
lavfi: add missing check in avfilter_filter_samples()
Avoid out-of-buffer data access when nb_channels is 8.
(cherry picked from commit ae21776207e8a2bbe268e7c9e203f7599dd87ddb)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/avfilter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index a57677c0e4..d2b4986cef 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -614,7 +614,7 @@ void avfilter_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) link->cur_buf->audio->sample_rate = samplesref->audio->sample_rate; /* Copy actual data into new samples buffer */ - for (i = 0; samplesref->data[i]; i++) + for (i = 0; samplesref->data[i] && i < 8; i++) memcpy(link->cur_buf->data[i], samplesref->data[i], samplesref->linesize[0]); avfilter_unref_buffer(samplesref); |