xf86-video-intel: src/sna/sna_accel.c

Chris Wilson ickle at kemper.freedesktop.org
Sun Sep 23 01:35:12 PDT 2012


 src/sna/sna_accel.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0fc6e5820e4543d52bcf8d0285ca6f69b5213831
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Sep 23 09:32:49 2012 +0100

    sna: Add missing protection against int16 overflow when copying
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index fbee637..58029c8 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4867,8 +4867,8 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc,
 
 	region.extents.x1 = dx;
 	region.extents.y1 = dy;
-	region.extents.x2 = dx + width;
-	region.extents.y2 = dy + height;
+	region.extents.x2 = bound(dx, width);
+	region.extents.y2 = bound(dy, height);
 	region.data = NULL;
 
 	DBG(("%s: dst extents (%d, %d), (%d, %d)\n", __FUNCTION__,


More information about the xorg-commit mailing list