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 a7c1689ded
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:

committed by
Luca Barbato

parent
4cb3efc206
commit
f3c7e604fa
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user