Browse Source

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

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
1b8741a684
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavformat/4xm.c

+ 5
- 0
libavformat/4xm.c View File

@@ -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 */


Loading…
Cancel
Save