[FFmpeg-cvslog] r13419 - trunk/libavformat/ffmdec.c

bcoudurier subversion
Mon May 26 05:53:10 CEST 2008


Author: bcoudurier
Date: Mon May 26 05:53:10 2008
New Revision: 13419

Log:
return error if len is negative, prevent segfault

Modified:
   trunk/libavformat/ffmdec.c

Modified: trunk/libavformat/ffmdec.c
==============================================================================
--- trunk/libavformat/ffmdec.c	(original)
+++ trunk/libavformat/ffmdec.c	Mon May 26 05:53:10 2008
@@ -89,6 +89,8 @@ static int ffm_read_data(AVFormatContext
     while (size > 0) {
     redo:
         len = ffm->packet_end - ffm->packet_ptr;
+        if (len < 0)
+            return -1;
         if (len > size)
             len = size;
         if (len == 0) {




More information about the ffmpeg-cvslog mailing list