[FFmpeg-cvslog] r10925 - trunk/libavformat/mp3.c

andoma subversion
Sun Nov 4 20:52:08 CET 2007


Author: andoma
Date: Sun Nov  4 20:52:08 2007
New Revision: 10925

Log:
make sure the mpeg audio header is valid before passing it to ff_mpegaudio_decode_header()



Modified:
   trunk/libavformat/mp3.c

Modified: trunk/libavformat/mp3.c
==============================================================================
--- trunk/libavformat/mp3.c	(original)
+++ trunk/libavformat/mp3.c	Sun Nov  4 20:52:08 2007
@@ -435,7 +435,11 @@ static void mp3_parse_vbr_tags(AVFormatC
     const offset_t xing_offtbl[2][2] = {{32, 17}, {17,9}};
     MPADecodeContext c;
 
-    ff_mpegaudio_decode_header(&c, get_be32(&s->pb));
+    v = get_be32(&s->pb);
+    if(ff_mpa_check_header(v) < 0)
+      return;
+
+    ff_mpegaudio_decode_header(&c, v);
     if(c.layer != 3)
         return;
 




More information about the ffmpeg-cvslog mailing list