diff options
author | James Almer <jamrial@gmail.com> | 2016-03-28 21:34:08 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-03-28 19:10:34 -0300 |
commit | 7b1e020fc5edbc09774d6fe7857d47d29f157a13 (patch) | |
tree | c701dd678099cd936cd695b8b09fdf17bb75b157 | |
parent | 3d9ebfd27264d0d2f5a379d76375d267fc98d616 (diff) | |
download | ffmpeg-7b1e020fc5edbc09774d6fe7857d47d29f157a13.tar.gz |
avformat/svag: fix division by zero
Fixes ticket #5386
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit d5a3578350a3901a26df39df196bb085760ec46f)
-rw-r--r-- | libavformat/svag.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/svag.c b/libavformat/svag.c index ab7f36c81a..08fc06b1ba 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); |