[FFmpeg-cvslog] r19361 - trunk/libavformat/asfdec.c

reimar subversion
Mon Jul 6 19:08:32 CEST 2009


Author: reimar
Date: Mon Jul  6 19:08:32 2009
New Revision: 19361

Log:
Check for packet_lenght 0, it is already treated as invalid by the padding check,
but that resulted in a confusing/wrong error message.

Modified:
   trunk/libavformat/asfdec.c

Modified: trunk/libavformat/asfdec.c
==============================================================================
--- trunk/libavformat/asfdec.c	Mon Jul  6 18:49:36 2009	(r19360)
+++ trunk/libavformat/asfdec.c	Mon Jul  6 19:08:32 2009	(r19361)
@@ -633,7 +633,7 @@ static int ff_asf_get_packet(AVFormatCon
     DO_2BITS(asf->packet_flags >> 3, padsize, 0); // padding length
 
     //the following checks prevent overflows and infinite loops
-    if(packet_length >= (1U<<29)){
+    if(!packet_length || packet_length >= (1U<<29)){
         av_log(s, AV_LOG_ERROR, "invalid packet_length %d at:%"PRId64"\n", packet_length, url_ftell(pb));
         return -1;
     }



More information about the ffmpeg-cvslog mailing list