summaryrefslogtreecommitdiff
path: root/libavformat/4xm.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-08-24 21:30:46 +0200
committerAnton Khirnov <anton@khirnov.net>2013-09-02 19:28:47 +0200
commita7c1689dedd11689edb30088d467ac03f9b8d1cf (patch)
treededcc0e5a02b78fae2ded9b168eddd316ec97739 /libavformat/4xm.c
parentdf33a58e5311ee9a64a573889b883a80e981af7b (diff)
downloadffmpeg-a7c1689dedd11689edb30088d467ac03f9b8d1cf.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
Diffstat (limited to 'libavformat/4xm.c')
-rw-r--r--libavformat/4xm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 614b1d5f2a..f003c9c25a 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -146,7 +146,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;
}