mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
lavfi: add missing check in avfilter_filter_samples()
Avoid out-of-buffer data access when nb_channels is 8.
This commit is contained in:
parent
e9af732a1a
commit
ae21776207
@ -678,7 +678,7 @@ void avfilter_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref)
|
|||||||
link->cur_buf->audio->sample_rate = samplesref->audio->sample_rate;
|
link->cur_buf->audio->sample_rate = samplesref->audio->sample_rate;
|
||||||
|
|
||||||
/* Copy actual data into new samples buffer */
|
/* 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]);
|
memcpy(link->cur_buf->data[i], samplesref->data[i], samplesref->linesize[0]);
|
||||||
|
|
||||||
avfilter_unref_buffer(samplesref);
|
avfilter_unref_buffer(samplesref);
|
||||||
|
Loading…
Reference in New Issue
Block a user