diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2011-12-27 15:15:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-03 22:35:42 +0100 |
commit | e9378b42b11a405c3e8d924bcf38d4ff121211b2 (patch) | |
tree | 4005f92e48e9047cdf6add7c5076f8cfdf0afeca | |
parent | 6caca265338e6b7770439a7038b873fec8ad82f7 (diff) | |
download | ffmpeg-e9378b42b11a405c3e8d924bcf38d4ff121211b2.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 5327cf9b69..8a40b299ce 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -677,7 +677,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); |