summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-09-23 09:32:49 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-23 09:32:49 +0100
commit0fc6e5820e4543d52bcf8d0285ca6f69b5213831 (patch)
treef9c62cf8fc47cfe31fbecabaa10272490dce6b73
parentc2ca1c5abca687adb08d6e137bc3b70bdecb083d (diff)
downloadxorg-driver-xf86-video-intel-0fc6e5820e4543d52bcf8d0285ca6f69b5213831.tar.gz
sna: Add missing protection against int16 overflow when copying
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index fbee637a..58029c89 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__,