diff options
author | Peter Ross <pross@xvid.org> | 2009-02-15 06:29:43 +0000 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2009-02-15 06:29:43 +0000 |
commit | 5f5e6af16982c172997abc75ff7a401124dd3dda (patch) | |
tree | fea65acbb93a647146aa8d9a6bca07f54b535848 /libavcodec/resample.c | |
parent | a0723a4d842a32f2c51840e588d107ab3ff84c17 (diff) | |
download | ffmpeg-5f5e6af16982c172997abc75ff7a401124dd3dda.tar.gz |
Prevent heap corruption when resampling 8-bit audio.
Originally committed as revision 17311 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/resample.c')
-rw-r--r-- | libavcodec/resample.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/resample.c b/libavcodec/resample.c index 98ceac72f0..829db76570 100644 --- a/libavcodec/resample.c +++ b/libavcodec/resample.c @@ -251,7 +251,7 @@ int audio_resample(ReSampleContext *s, short *output, short *input, int nb_sampl 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]); |