[vlc-commits] speex: fix occasional buffer overflow
Rémi Denis-Courmont
git at videolan.org
Mon Oct 31 21:18:01 CET 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Oct 31 22:16:57 2011 +0200| [2ee87126c258da4f56dd10f63224eaf0ca9379c5] | committer: Rémi Denis-Courmont
speex: fix occasional buffer overflow
(VLC simply lost one sample - no memory errors.)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2ee87126c258da4f56dd10f63224eaf0ca9379c5
---
modules/audio_filter/resampler/speex.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/audio_filter/resampler/speex.c b/modules/audio_filter/resampler/speex.c
index 4bee5e8..39ca978 100644
--- a/modules/audio_filter/resampler/speex.c
+++ b/modules/audio_filter/resampler/speex.c
@@ -111,7 +111,7 @@ static block_t *Resample (filter_t *filter, block_t *in)
const unsigned orate = filter->fmt_out.audio.i_rate;
spx_uint32_t ilen = in->i_nb_samples;
- spx_uint32_t olen = ((ilen + 1) * orate) / irate;
+ spx_uint32_t olen = ((ilen + 2) * orate) / irate;
block_t *out = block_Alloc (olen * framesize);
if (unlikely(out == NULL))
More information about the vlc-commits
mailing list