[FFmpeg-cvslog] 4xm: check that bits per sample is strictly positive
Anton Khirnov
git at videolan.org
Tue Sep 3 14:58:04 CEST 2013
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Aug 24 21:30:46 2013 +0200| [a7c1689dedd11689edb30088d467ac03f9b8d1cf] | committer: Anton Khirnov
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 at libav.org
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a7c1689dedd11689edb30088d467ac03f9b8d1cf
---
libavformat/4xm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
More information about the ffmpeg-cvslog
mailing list