[FFmpeg-cvslog] r17453 - trunk/libavcodec/mpegvideo_xvmc.c

iive subversion
Thu Feb 19 10:55:54 CET 2009


Author: iive
Date: Thu Feb 19 10:55:52 2009
New Revision: 17453

Log:
Add more paranoid checks of xvmc token.

Modified:
   trunk/libavcodec/mpegvideo_xvmc.c

Modified: trunk/libavcodec/mpegvideo_xvmc.c
==============================================================================
--- trunk/libavcodec/mpegvideo_xvmc.c	Thu Feb 19 09:39:47 2009	(r17452)
+++ trunk/libavcodec/mpegvideo_xvmc.c	Thu Feb 19 10:55:52 2009	(r17453)
@@ -78,7 +78,10 @@ int ff_xvmc_field_start(MpegEncContext *
 
     assert(avctx);
     if (!render || render->xvmc_id != AV_XVMC_ID ||
-        !render->data_blocks || !render->mv_blocks) {
+        !render->data_blocks || !render->mv_blocks ||
+        (unsigned int)render->allocated_mv_blocks   > INT_MAX/(64*6) ||
+        (unsigned int)render->allocated_data_blocks > INT_MAX/64     ||
+        !render->p_surface) {
         av_log(avctx, AV_LOG_ERROR,
                "Render token doesn't look as expected.\n");
         return -1; // make sure that this is a render packet




More information about the ffmpeg-cvslog mailing list