mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Add more paranoid checks of xvmc token.
Originally committed as revision 17453 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
9cfc1b3a84
commit
859bb3cfee
@ -78,7 +78,10 @@ int ff_xvmc_field_start(MpegEncContext *s, AVCodecContext *avctx)
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user