[FFmpeg-cvslog] 4xm: fix division by zero caused by bps<8

Michael Niedermayer git at videolan.org
Thu Jun 7 01:44:14 CEST 2012


ffmpeg | branch: release/0.11 | Michael Niedermayer <michaelni at gmx.at> | Tue May 29 19:16:22 2012 +0200| [56e987d2cd75f9e2ca77c08bb59449a11e58a53a] | committer: Michael Niedermayer

4xm: fix division by zero caused by bps<8

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 1b8741a6843f3f4667c81c2d63d3182858aa534f)

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

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

 libavformat/4xm.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 19ebffd..a794e88 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -200,6 +200,11 @@ static int fourxm_read_header(AVFormatContext *s)
                 ret = AVERROR_INVALIDDATA;
                 goto fail;
             }
+            if(!fourxm->tracks[current_track].adpcm && fourxm->tracks[current_track].bits<8){
+                av_log(s, AV_LOG_ERROR, "bits unspecified for non ADPCM\n");
+                ret = AVERROR_INVALIDDATA;
+                goto fail;
+            }
             i += 8 + size;
 
             /* allocate a new AVStream */



More information about the ffmpeg-cvslog mailing list