diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-24 16:05:09 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-24 18:26:35 +0000 |
commit | f3b11ebc28114062581c39089781114323946654 (patch) | |
tree | b5028fae89a20052cbd3eac4f2d037cb6daffa5e | |
parent | b56971986d2d495aa38f015beb659fb12f0d433a (diff) |
sna: Add more assertions for copy errors
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index a6e211d2..70b712a4 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -3495,6 +3495,17 @@ fallback: src_dx, src_dy, dst_dx, dst_dy, src_stride, dst_stride)); + + assert(box->x1 + src_dx >= 0); + assert(box->y1 + src_dy >= 0); + assert(box->x2 + src_dx <= src_pixmap->drawable.width); + assert(box->y2 + src_dy <= src_pixmap->drawable.height); + + assert(box->x1 + dst_dx >= 0); + assert(box->y1 + dst_dy >= 0); + assert(box->x2 + dst_dx <= dst_pixmap->drawable.width); + assert(box->y2 + dst_dy <= dst_pixmap->drawable.height); + memcpy_blt(src_bits, dst_bits, bpp, src_stride, dst_stride, box->x1, box->y1, |