ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Sun 
Jul 12 16:24:20 2015 +0200| [839d6bc192f7ef94343872ff039799501af38855] | 
committer: Michael Niedermayer

avformat/riffde: Fix integer overflow in bitrate

Signed-off-by: Michael Niedermayer <[email protected]>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=839d6bc192f7ef94343872ff039799501af38855
---

 libavformat/riffdec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
index 3291d61..7eecdb2 100644
--- a/libavformat/riffdec.c
+++ b/libavformat/riffdec.c
@@ -99,13 +99,13 @@ int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb,
         id                 = avio_rl16(pb);
         codec->channels    = avio_rl16(pb);
         codec->sample_rate = avio_rl32(pb);
-        bitrate            = avio_rl32(pb) * 8;
+        bitrate            = avio_rl32(pb) * 8LL;
         codec->block_align = avio_rl16(pb);
     } else {
         id                 = avio_rb16(pb);
         codec->channels    = avio_rb16(pb);
         codec->sample_rate = avio_rb32(pb);
-        bitrate            = avio_rb32(pb) * 8;
+        bitrate            = avio_rb32(pb) * 8LL;
         codec->block_align = avio_rb16(pb);
     }
     if (size == 14) {  /* We're dealing with plain vanilla WAVEFORMAT */

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to