ffmpeg | branch: release/3.1 | Andreas Cadhalpun 
<andreas.cadhal...@googlemail.com> | Sun Oct 16 22:39:47 2016 +0200| 
[b3991ccd1170d84f5b5d84566b0c78a42724a073] | committer: Andreas Cadhalpun

astdec: fix division by zero

Reviewed-by: Michael Niedermayer <mich...@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
(cherry picked from commit 9959a52b14bcfa3e5baeb3fc8a86c04bbc0d3d5d)
Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b3991ccd1170d84f5b5d84566b0c78a42724a073
---

 libavformat/astdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/astdec.c b/libavformat/astdec.c
index f3ca721..7a53d0b 100644
--- a/libavformat/astdec.c
+++ b/libavformat/astdec.c
@@ -90,7 +90,7 @@ static int ast_read_packet(AVFormatContext *s, AVPacket *pkt)
     pos  = avio_tell(s->pb);
     type = avio_rl32(s->pb);
     size = avio_rb32(s->pb);
-    if (size > INT_MAX / s->streams[0]->codecpar->channels)
+    if (!s->streams[0]->codecpar->channels || size > INT_MAX / 
s->streams[0]->codecpar->channels)
         return AVERROR_INVALIDDATA;
 
     size *= s->streams[0]->codecpar->channels;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to