summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-03-21 13:30:45 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-21 13:31:00 +0000
commit2f23c660f58e0db2107255f32a3503dae62fe304 (patch)
tree33e3ffbe32291f34449b226d51373aa0c69c513f
parente0cd13e2af3db237c171f8ca1c70ddc67b1fbce4 (diff)
sna: Assert that the tiled blt is correctly clipped
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 33e08bef..b8f5059e 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -8697,6 +8697,11 @@ sna_poly_fill_rect_tiled_blt(DrawablePtr drawable,
if (tile_y < 0)
tile_y += tile_height;
+ assert(r.x + dx >= 0);
+ assert(r.y + dy >= 0);
+ assert(r.x + dx + r.width <= pixmap->drawable.width);
+ assert(r.y + dy + r.height <= pixmap->drawable.height);
+
r.y += dy;
do {
int16_t width = r.width;