aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo_motion.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-09-04 01:36:51 +0300
committerMartin Storsjö <martin@martin.st>2013-09-04 14:33:29 +0300
commita711a2cb473dc95708f371a82c85c97fe789b5c2 (patch)
treee558b0bd4a86175726a499b41c47ce6a76d1689c /libavcodec/mpegvideo_motion.c
parent0ebfdae099d2749240b6a565abcdf0bf62589748 (diff)
downloadffmpeg-a711a2cb473dc95708f371a82c85c97fe789b5c2.tar.gz
mpegvideo: Avoid 32-bit wrapping of linesize multiplications
This makes sure that linesize * start_y doesn't overflow, so that emulated_edge_mc can get back the original value if needed. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/mpegvideo_motion.c')
-rw-r--r--libavcodec/mpegvideo_motion.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c
index c8109b12d9..cbf200f3f5 100644
--- a/libavcodec/mpegvideo_motion.c
+++ b/libavcodec/mpegvideo_motion.c
@@ -217,7 +217,8 @@ void mpeg_motion_internal(MpegEncContext *s,
{
uint8_t *ptr_y, *ptr_cb, *ptr_cr;
int dxy, uvdxy, mx, my, src_x, src_y,
- uvsrc_x, uvsrc_y, v_edge_pos, uvlinesize, linesize;
+ uvsrc_x, uvsrc_y, v_edge_pos;
+ ptrdiff_t uvlinesize, linesize;
#if 0
if(s->quarter_sample)