[FFmpeg-cvslog] aiffdec: fix division by zero

Andreas Cadhalpun git at videolan.org
Sun Nov 27 01:30:04 EET 2016


ffmpeg | branch: release/3.1 | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Sun Oct 16 22:29:13 2016 +0200| [230c04e3f6d720cc7fa17735b2ef91570417964d] | committer: Andreas Cadhalpun

aiffdec: fix division by zero

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
(cherry picked from commit c143a9c96ff907a8fe4598529664aec7cb156708)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

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

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

diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index d191bc4..bad92a0 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -376,7 +376,7 @@ static int aiff_read_packet(AVFormatContext *s,
         size = st->codecpar->block_align;
         break;
     default:
-        size = (MAX_SIZE / st->codecpar->block_align) * st->codecpar->block_align;
+        size = st->codecpar->block_align ? (MAX_SIZE / st->codecpar->block_align) * st->codecpar->block_align : MAX_SIZE;
     }
     size = FFMIN(max_size, size);
     res = av_get_packet(s->pb, pkt, size);



More information about the ffmpeg-cvslog mailing list