From f598df3c588432b620fe47b774ff20a45535fc73 Mon Sep 17 00:00:00 2001
From: Oana Stratulat <oanaandreeastratulat@gmail.com>
Date: Wed, 4 Jan 2012 03:13:27 +0200
Subject: [PATCH] electronicarts: Fix division by zero. Fixes Ticket #793
Signed-off-by: Oana Stratulat <oanaandreeastratulat@gmail.com>
---
libavformat/electronicarts.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 75f92af..41ed089 100644
|
a
|
b
|
static int process_audio_header_eacs(AVFormatContext *s)
|
| 221 | 221 | |
| 222 | 222 | ea->sample_rate = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb); |
| 223 | 223 | ea->bytes = avio_r8(pb); /* 1=8-bit, 2=16-bit */ |
| | 224 | if(ea->bytes == 0){ |
| | 225 | av_log(s,AV_LOG_ERROR,"the file is corrupted, ea->bytes = 0\n"); |
| | 226 | return AVERROR_INVALIDDATA; |
| | 227 | } |
| 224 | 228 | ea->num_channels = avio_r8(pb); |
| 225 | 229 | compression_type = avio_r8(pb); |
| 226 | 230 | avio_skip(pb, 13); |