Module: libav Branch: master Commit: a7c1689dedd11689edb30088d467ac03f9b8d1cf
Author: Anton Khirnov <[email protected]> Committer: Anton Khirnov <[email protected]> Date: Sat Aug 24 21:30:46 2013 +0200 4xm: check that bits per sample is strictly positive Avoids a divide by zero. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: [email protected] --- libavformat/4xm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavformat/4xm.c b/libavformat/4xm.c index 614b1d5..f003c9c 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; } _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
