1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

swresample/swresample: Fix integer overflow in seed calculation

Fixes CID1322333

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 32f53958b8)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-09-03 09:22:31 +02:00
parent fb84d92079
commit 3e9ccd0019

View File

@ -643,7 +643,7 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co
return ret;
if(ret)
for(ch=0; ch<s->dither.noise.ch_count; ch++)
if((ret=swri_get_dither(s, s->dither.noise.ch[ch], s->dither.noise.count, 12345678913579<<ch, s->dither.noise.fmt))<0)
if((ret=swri_get_dither(s, s->dither.noise.ch[ch], s->dither.noise.count, (12345678913579ULL*ch + 3141592) % 2718281828U, s->dither.noise.fmt))<0)
return ret;
av_assert0(s->dither.noise.ch_count == preout->ch_count);