electronicarts: prevent endless loop opportunity in process_audio_header_elements()
authorPeter Ross <pross@xvid.org>
Mon, 10 Jan 2011 12:56:50 +0000 (12:56 +0000)
committerPeter Ross <pross@xvid.org>
Mon, 10 Jan 2011 12:56:50 +0000 (12:56 +0000)
Fixes issue2529.

Originally committed as revision 26302 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/electronicarts.c

index 27cd4a6..f671c26 100644 (file)
@@ -113,6 +113,8 @@ static int process_audio_header_elements(AVFormatContext *s)
         int inSubheader;
         uint8_t byte;
         byte = get_byte(pb);
+        if (!byte)
+            break;
 
         switch (byte) {
         case 0xFD: