aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-08-24 21:30:46 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-09-07 10:15:13 +0200
commitf3c7e604fabd1505c7de3eaddee5a24b8aacf4c3 (patch)
treee68f6ecdf04901b10e2233f38116ec0affc3f295
parent4cb3efc206a69e0affceb7715c1d83c3a568b2ed (diff)
downloadffmpeg-f3c7e604fabd1505c7de3eaddee5a24b8aacf4c3.tar.gz
4xm: check that bits per sample is strictly positive
Avoids a divide by zero. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org (cherry picked from commit a7c1689dedd11689edb30088d467ac03f9b8d1cf) Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r--libavformat/4xm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index c0b3914fa1..5fb1921dd9 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -154,7 +154,7 @@ static int parse_strk(AVFormatContext *s,
if (fourxm->tracks[track].channels <= 0 ||
fourxm->tracks[track].sample_rate <= 0 ||
- fourxm->tracks[track].bits < 0) {
+ fourxm->tracks[track].bits <= 0) {
av_log(s, AV_LOG_ERROR, "audio header invalid\n");
return AVERROR_INVALIDDATA;
}