mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 20:19:55 +00:00
indeo3: fix off by one in MV validity check
CC:libav-stable@libav.org
This commit is contained in:
parent
97c56ad796
commit
95220be1fa
@ -235,8 +235,8 @@ static int copy_cell(Indeo3DecodeContext *ctx, Plane *plane, Cell *cell)
|
||||
|
||||
/* -1 because there is an extra line on top for prediction */
|
||||
if ((cell->ypos << 2) + mv_y < -1 || (cell->xpos << 2) + mv_x < 0 ||
|
||||
((cell->ypos + cell->height) << 2) + mv_y >= plane->height ||
|
||||
((cell->xpos + cell->width) << 2) + mv_x >= plane->width) {
|
||||
((cell->ypos + cell->height) << 2) + mv_y > plane->height ||
|
||||
((cell->xpos + cell->width) << 2) + mv_x > plane->width) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR,
|
||||
"Motion vectors point out of the frame.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
@ -607,8 +607,8 @@ static int decode_cell(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
|
||||
|
||||
/* -1 because there is an extra line on top for prediction */
|
||||
if ((cell->ypos << 2) + mv_y < -1 || (cell->xpos << 2) + mv_x < 0 ||
|
||||
((cell->ypos + cell->height) << 2) + mv_y >= plane->height ||
|
||||
((cell->xpos + cell->width) << 2) + mv_x >= plane->width) {
|
||||
((cell->ypos + cell->height) << 2) + mv_y > plane->height ||
|
||||
((cell->xpos + cell->width) << 2) + mv_x > plane->width) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR,
|
||||
"Motion vectors point out of the frame.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
Loading…
Reference in New Issue
Block a user