diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2011-12-27 15:15:02 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2011-12-27 15:21:00 +0100 |
commit | ae21776207e8a2bbe268e7c9e203f7599dd87ddb (patch) | |
tree | 82483f47ee80d6a4e12b621d24e3b21acce19ba3 /libavfilter | |
parent | e9af732a1a4c28f81959f19d434c9be609cff22a (diff) | |
download | ffmpeg-ae21776207e8a2bbe268e7c9e203f7599dd87ddb.tar.gz |
lavfi: add missing check in avfilter_filter_samples()
Avoid out-of-buffer data access when nb_channels is 8.
Diffstat (limited to 'libavfilter')
-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 b4c9fa6593..97f78e4629 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -678,7 +678,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); |