aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-10-16 22:29:13 +0200
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-11-27 00:27:56 +0100
commit230c04e3f6d720cc7fa17735b2ef91570417964d (patch)
tree3b11baaaa312f7ddbf5c3d00681af340d89bf9f8 /libavformat
parentc3f97bf54496ee15a848683c3ca8772367cba216 (diff)
downloadffmpeg-230c04e3f6d720cc7fa17735b2ef91570417964d.tar.gz
aiffdec: fix division by zero
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> (cherry picked from commit c143a9c96ff907a8fe4598529664aec7cb156708) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/aiffdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index d191bc4c04..bad92a0e2f 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);