Commit 2ee87126 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

speex: fix occasional buffer overflow

(VLC simply lost one sample - no memory errors.)
parent e9e13b75
...@@ -111,7 +111,7 @@ static block_t *Resample (filter_t *filter, block_t *in) ...@@ -111,7 +111,7 @@ static block_t *Resample (filter_t *filter, block_t *in)
const unsigned orate = filter->fmt_out.audio.i_rate; const unsigned orate = filter->fmt_out.audio.i_rate;
spx_uint32_t ilen = in->i_nb_samples; 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); block_t *out = block_Alloc (olen * framesize);
if (unlikely(out == NULL)) if (unlikely(out == NULL))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment