Mercurial > libavcodec.hg
changeset 8911:28b706b75b00 libavcodec
Prevent heap corruption when resampling 8-bit audio.
author | pross |
---|---|
date | Sun, 15 Feb 2009 06:29:43 +0000 |
parents | a11771712f48 |
children | 63e989c76ed2 |
files | resample.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/resample.c Sun Feb 15 02:36:43 2009 +0000 +++ b/resample.c Sun Feb 15 06:29:43 2009 +0000 @@ -251,7 +251,7 @@ int ostride[1] = { 2 }; const void *ibuf[1] = { input }; void *obuf[1]; - unsigned input_size = nb_samples*s->input_channels*s->sample_size[0]; + unsigned input_size = nb_samples*s->input_channels*2; if (!s->buffer_size[0] || s->buffer_size[0] < input_size) { av_free(s->buffer[0]);