Commit c143a9c9 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun

aiffdec: fix division by zero

Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
parent f04c27fe
...@@ -380,7 +380,7 @@ static int aiff_read_packet(AVFormatContext *s, ...@@ -380,7 +380,7 @@ static int aiff_read_packet(AVFormatContext *s,
size = st->codecpar->block_align; size = st->codecpar->block_align;
break; break;
default: 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); size = FFMIN(max_size, size);
res = av_get_packet(s->pb, pkt, size); res = av_get_packet(s->pb, pkt, size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment