projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd3754a
)
indeo5: reject negative motion vectors
author
Luca Barbato
<lu_zero@gentoo.org>
Sun, 30 Jun 2013 08:35:07 +0000
(10:35 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Mon, 1 Jul 2013 02:20:51 +0000
(
04:20
+0200)
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
libavcodec/indeo5.c
patch
|
blob
|
history
diff --git
a/libavcodec/indeo5.c
b/libavcodec/indeo5.c
index
dc5f6f0
..
7a60f49
100644
(file)
--- 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;
+ }
}
}
}