[libav-stable] g2meet: Allocate cursor buffers large enough to fit the aligned width

Martin Storsjö git at libav.org
Thu Sep 12 09:58:52 CEST 2013


Module: libav
Branch: master
Commit: b1e469885362febce3d9a4678624e44a92f77da9

Author:    Martin Storsjö <martin at martin.st>
Committer: Martin Storsjö <martin at martin.st>
Date:      Wed Sep 11 23:40:12 2013 +0300

g2meet: Allocate cursor buffers large enough to fit the aligned width

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>

---

 libavcodec/g2meet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c
index 199e8af..1bbac2d 100644
--- a/libavcodec/g2meet.c
+++ b/libavcodec/g2meet.c
@@ -488,7 +488,7 @@ static int g2m_load_cursor(AVCodecContext *avctx, G2MContext *c,
     cursor_hot_y  = bytestream2_get_byte(gb);
     cursor_fmt    = bytestream2_get_byte(gb);
 
-    cursor_stride = cursor_w * 4;
+    cursor_stride = FFALIGN(cursor_w, 32) * 4;
 
     if (cursor_w < 1 || cursor_w > 256 ||
         cursor_h < 1 || cursor_h > 256) {



More information about the libav-stable mailing list