Commit 0d3a51e5 authored by Oana Stratulat's avatar Oana Stratulat Committed by Michael Niedermayer

electronicarts: Fix division by zero. Fixes Ticket #793

Signed-off-by: 's avatarOana Stratulat <oanaandreeastratulat@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ad1c8dd6
...@@ -221,6 +221,10 @@ static int process_audio_header_eacs(AVFormatContext *s) ...@@ -221,6 +221,10 @@ static int process_audio_header_eacs(AVFormatContext *s)
ea->sample_rate = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb); ea->sample_rate = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
ea->bytes = avio_r8(pb); /* 1=8-bit, 2=16-bit */ ea->bytes = avio_r8(pb); /* 1=8-bit, 2=16-bit */
if(ea->bytes == 0){
av_log(s,AV_LOG_ERROR,"the file is corrupted, ea->bytes = 0\n");
return AVERROR_INVALIDDATA;
}
ea->num_channels = avio_r8(pb); ea->num_channels = avio_r8(pb);
compression_type = avio_r8(pb); compression_type = avio_r8(pb);
avio_skip(pb, 13); avio_skip(pb, 13);
......
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