diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-06-30 10:35:07 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-07-01 04:20:51 +0200 |
commit | 1194a410807bac3eafbeb632578b937656d273e7 (patch) | |
tree | c201682b831137a134433292ed5d241df61d4227 | |
parent | dd3754a48854cd570d38db72394491aab0f36570 (diff) | |
download | ffmpeg-1194a410807bac3eafbeb632578b937656d273e7.tar.gz |
indeo5: reject negative motion vectors
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
-rw-r--r-- | libavcodec/indeo5.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c index dc5f6f09ad..7a60f49621 100644 --- a/libavcodec/indeo5.c +++ b/libavcodec/indeo5.c @@ -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; + } } } } |