Mercurial > libavcodec.hg
changeset 8953:5e70bdb97d0c libavcodec
Thoroughly check all fields set by the application in xvmc struct.
author | iive |
---|---|
date | Mon, 16 Feb 2009 22:46:30 +0000 |
parents | 49817775b44f |
children | 409d20e15da8 |
files | mpegvideo_xvmc.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegvideo_xvmc.c Mon Feb 16 22:23:47 2009 +0000 +++ b/mpegvideo_xvmc.c Mon Feb 16 22:46:30 2009 +0000 @@ -90,7 +90,11 @@ 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;