aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-03 09:22:31 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-26 16:58:32 +0100
commit2c08fc9b28aebb3ecdf3d42b5075cfd085292fdf (patch)
treea893e931c9c38d481ba2ef85feb197d0f964f345
parent4531c0dc8fe13128702972fae7b355f3bfdcf058 (diff)
downloadffmpeg-2c08fc9b28aebb3ecdf3d42b5075cfd085292fdf.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index dbcb42e817..bf41332ee0 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -644,7 +644,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);