[FFmpeg-cvslog] avformat/svag: fix division by zero
James Almer
git at videolan.org
Tue Mar 29 02:34:55 CEST 2016
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Mar 28 21:34:08 2016 -0300| [d5a3578350a3901a26df39df196bb085760ec46f] | committer: James Almer
avformat/svag: fix division by zero
Fixes ticket #5386
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d5a3578350a3901a26df39df196bb085760ec46f
---
libavformat/svag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/svag.c b/libavformat/svag.c
index ab7f36c..08fc06b 100644
--- a/libavformat/svag.c
+++ b/libavformat/svag.c
@@ -48,7 +48,7 @@ static int svag_read_header(AVFormatContext *s)
if (st->codec->sample_rate <= 0)
return AVERROR_INVALIDDATA;
st->codec->channels = avio_rl32(s->pb);
- if (st->codec->channels <= 0)
+ if (st->codec->channels <= 0 || st->codec->channels > 8)
return AVERROR_INVALIDDATA;
st->duration = size / (16 * st->codec->channels) * 28;
align = avio_rl32(s->pb);
More information about the ffmpeg-cvslog
mailing list