Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-03 10:22:31 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-03 10:32:43 +0300
commit32f53958b8f6ed4c3c2a7447c1e47d012796fae2 (patch)
treecb9976a26ee5b8c91373358c634fd004f07f7d3b /libswresample/swresample.c
parent053e80f6eaf8d87521fe58ea96886b6ee0bbe59d (diff)
swresample/swresample: Fix integer overflow in seed calculation
Fixes CID1322333 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswresample/swresample.c')
-rw-r--r--libswresample/swresample.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index e480269d05..8e238998e9 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -650,7 +650,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);