[FFmpeg-cvslog] audemux: Fix potential integer overflow leading to a division by 0

Michael Niedermayer git at videolan.org
Sun Apr 22 16:00:31 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 22 15:34:21 2012 +0200| [52fdaf27f7160990f0612c7b5f46592bf6410796] | committer: Michael Niedermayer

audemux: Fix potential integer overflow leading to a division by 0

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/au.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/au.c b/libavformat/au.c
index bec0d76..b66d559 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -170,7 +170,7 @@ static int au_read_header(AVFormatContext *s)
     st->codec->channels = channels;
     st->codec->sample_rate = rate;
     if (data_size != AU_UNKNOWN_SIZE)
-    st->duration = (((int64_t)data_size)<<3) / (st->codec->channels * bps);
+    st->duration = (((int64_t)data_size)<<3) / (st->codec->channels * (int64_t)bps);
     avpriv_set_pts_info(st, 64, 1, rate);
     return 0;
 }



More information about the ffmpeg-cvslog mailing list