[FFmpeg-soc] [soc]: r4763 - rtmp/rtmpproto.c

kostya subversion at mplayerhq.hu
Wed Jul 22 08:12:36 CEST 2009


Author: kostya
Date: Wed Jul 22 08:12:36 2009
New Revision: 4763

Log:
Check for negative chunk size value

Modified:
   rtmp/rtmpproto.c

Modified: rtmp/rtmpproto.c
==============================================================================
--- rtmp/rtmpproto.c	Wed Jul 22 08:12:16 2009	(r4762)
+++ rtmp/rtmpproto.c	Wed Jul 22 08:12:36 2009	(r4763)
@@ -362,6 +362,10 @@ static int rtmp_parse_result(URLContext 
             return -1;
         }
         rt->chunk_size = AV_RB32(pkt->data);
+        if (rt->chunk_size <= 0) {
+            //av_log(s, AV_LOG_ERROR, "Incorrect chunk size %d\n", rt->chunk_size);
+            return -1;
+        }
         //av_log(s, AV_LOG_DEBUG, "New chunk size = %d\n", rt->chunk_size);
         break;
     case RTMP_PT_PING:


More information about the FFmpeg-soc mailing list