summaryrefslogtreecommitdiff
path: root/libavformat/electronicarts.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2011-01-11 02:25:12 +0000
committerPeter Ross <pross@xvid.org>2011-01-11 02:25:12 +0000
commit1c4ac0353021b1e243486cc6752cc9258d6de1a7 (patch)
tree92724abbe99e17437cbe1072497989053f588892 /libavformat/electronicarts.c
parent09fffe9bd4588330cbf6f6805b45c2b79c68ed99 (diff)
electronicarts: prevent endless loop opportunity in process_audio_header_elements()
Fixes issue2529. Originally committed as revision 26307 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/electronicarts.c')
-rw-r--r--libavformat/electronicarts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 27cd4a62db..b796edeb9c 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -109,7 +109,7 @@ static int process_audio_header_elements(AVFormatContext *s)
ea->sample_rate = -1;
ea->num_channels = 1;
- while (inHeader) {
+ while (!url_feof(pb) && inHeader) {
int inSubheader;
uint8_t byte;
byte = get_byte(pb);
@@ -118,7 +118,7 @@ static int process_audio_header_elements(AVFormatContext *s)
case 0xFD:
av_log (s, AV_LOG_DEBUG, "entered audio subheader\n");
inSubheader = 1;
- while (inSubheader) {
+ while (!url_feof(pb) && inSubheader) {
uint8_t subbyte;
subbyte = get_byte(pb);