[FFmpeg-cvslog] mpegvideo: Avoid 32-bit wrapping of linesize multiplications

Martin Storsjö git at videolan.org
Thu Sep 26 00:26:10 CEST 2013


ffmpeg | branch: release/0.10 | Martin Storsjö <martin at martin.st> | Wed Sep  4 01:36:51 2013 +0300| [5473d23ece9e42a8003fc880027fe242604ce367] | committer: Sean McGovern

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 at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit a711a2cb473dc95708f371a82c85c97fe789b5c2)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5473d23ece9e42a8003fc880027fe242604ce367
---

 libavcodec/mpegvideo_common.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h
index e8daf2e..763c319 100644
--- a/libavcodec/mpegvideo_common.h
+++ b/libavcodec/mpegvideo_common.h
@@ -244,7 +244,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)



More information about the ffmpeg-cvslog mailing list