[FFmpeg-cvslog] r17387 - trunk/libavcodec/mpegvideo_xvmc.c
iive
subversion
Mon Feb 16 23:46:31 CET 2009
Author: iive
Date: Mon Feb 16 23:46:30 2009
New Revision: 17387
Log:
Thoroughly check all fields set by the application in xvmc struct.
Modified:
trunk/libavcodec/mpegvideo_xvmc.c
Modified: trunk/libavcodec/mpegvideo_xvmc.c
==============================================================================
--- trunk/libavcodec/mpegvideo_xvmc.c Mon Feb 16 23:23:47 2009 (r17386)
+++ trunk/libavcodec/mpegvideo_xvmc.c Mon Feb 16 23:46:30 2009 (r17387)
@@ -90,7 +90,11 @@ int ff_xvmc_field_start(MpegEncContext *
return -1;
}
if (render->allocated_mv_blocks < 1 ||
- render->allocated_data_blocks < mb_block_count) {
+ render->allocated_data_blocks < render->allocated_mv_blocks*mb_block_count ||
+ render->start_mv_blocks_num >= render->allocated_mv_blocks ||
+ render->next_free_data_block_num >
+ render->allocated_data_blocks -
+ mb_block_count*(render->allocated_mv_blocks-render->start_mv_blocks_num)) {
av_log(avctx, AV_LOG_ERROR,
"Rendering surface doesn't provide enough block structures to work with.\n");
return -1;
More information about the ffmpeg-cvslog
mailing list