sna: Add missing protection against int16 overflow when copying
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
c2ca1c5abc
commit
0fc6e5820e
|
|
@ -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__,
|
||||
|
|
|
|||
Loading…
Reference in New Issue