[FFmpeg-cvslog] swresample/swresample: Fix integer overflow in seed	calculation
    Michael Niedermayer 
    git at videolan.org
       
    Sun Dec  6 12:57:09 CET 2015
    
    
  
ffmpeg | branch: release/2.4 | Michael Niedermayer <michael at niedermayer.cc> | Thu Sep  3 09:22:31 2015 +0200| [f66787d3452c993ed0285cbb44369a558c733703] | committer: Michael Niedermayer
swresample/swresample: Fix integer overflow in seed calculation
Fixes CID1322333
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 32f53958b8f6ed4c3c2a7447c1e47d012796fae2)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f66787d3452c993ed0285cbb44369a558c733703
---
 libswresample/swresample.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 3e23912..e9bc659 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -638,7 +638,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);
 
    
    
More information about the ffmpeg-cvslog
mailing list