Commit 1194a410 authored by Luca Barbato's avatar Luca Barbato

indeo5: reject negative motion vectors

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
parent dd3754a4
......@@ -520,6 +520,12 @@ static int decode_mb_info(IVI45DecContext *ctx, IVIBandDesc *band,
mv_x += IVI_TOSIGNED(mv_delta);
mb->mv_x = mv_x;
mb->mv_y = mv_y;
if (mv_x < 0 || mv_y < 0) {
av_log(avctx, AV_LOG_ERROR, "Invalid MV %d %d\n",
mv_x, mv_y);
mb->mv_x = mb->mv_y = 0;
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