[FFmpeg-cvslog] r26307 - trunk/libavformat/electronicarts.c

pross subversion
Tue Jan 11 03:25:12 CET 2011


Author: pross
Date: Tue Jan 11 03:25:12 2011
New Revision: 26307

Log:
electronicarts: prevent endless loop opportunity in process_audio_header_elements()
Fixes issue2529.

Modified:
   trunk/libavformat/electronicarts.c

Modified: trunk/libavformat/electronicarts.c
==============================================================================
--- trunk/libavformat/electronicarts.c	Tue Jan 11 00:42:45 2011	(r26306)
+++ trunk/libavformat/electronicarts.c	Tue Jan 11 03:25:12 2011	(r26307)
@@ -109,7 +109,7 @@ static int process_audio_header_elements
     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
         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);
 



More information about the ffmpeg-cvslog mailing list