diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-03 09:22:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-12 02:55:46 +0100 |
commit | 95db0aa276feca1e818c59f9905927a5932e881c (patch) | |
tree | f4d981c949f2a9b572bbba5f40acb01f3b8ee4ac | |
parent | 1e6f641052aad75cbf4b7c2d7207625359a16292 (diff) | |
download | ffmpeg-95db0aa276feca1e818c59f9905927a5932e881c.tar.gz |
swresample/swresample: Fix integer overflow in seed calculation
Fixes CID1322333
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 32f53958b8f6ed4c3c2a7447c1e47d012796fae2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libswresample/swresample.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 693a403f90..400b529785 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -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); |