Commit 71091698 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '95220be1'

* commit '95220be1':
  indeo3: fix off by one in MV validity check
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 14f45bcb 95220be1
......@@ -242,8 +242,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;
......@@ -615,8 +615,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment