[FFmpeg-soc] [soc]: r5809 - mms/mmst.c

spyfeng subversion at mplayerhq.hu
Fri May 21 18:31:27 CEST 2010


Author: spyfeng
Date: Fri May 21 18:31:27 2010
New Revision: 5809

Log:
add check in case of infinite loop.

Modified:
   mms/mmst.c

Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c	Fri May 21 18:26:51 2010	(r5808)
+++ mms/mmst.c	Fri May 21 18:31:27 2010	(r5809)
@@ -431,6 +431,10 @@ static int asf_header_parser(MMSContext 
     p += sizeof(ff_asf_guid) + 14;
     while(end - p >= sizeof(ff_asf_guid) + 8) {
         uint64_t chunksize = AV_RL64(p + sizeof(ff_asf_guid));
+        if (!chunksize) {
+            dprintf("chunksize is zero!\n");
+            return -1;
+        }
         dprintf("chunksize is %d\n", chunksize);
         if (chunksize > end - p)
            return -1;


More information about the FFmpeg-soc mailing list