diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-14 13:06:26 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-14 17:44:38 +0100 |
commit | 4d4aca21fd32a367d78dfaf1c23b4faeabe36428 (patch) | |
tree | 5f0ee4c2f74682f9c476a23d3261244a76fee8a0 /src/sna/blt.c | |
parent | 83961051789e418f6022096b1ed2302cb2f05e5b (diff) |
sna: assert that the memcpy upload path points to valid regions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/blt.c')
-rw-r--r-- | src/sna/blt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sna/blt.c b/src/sna/blt.c index ac20372e..1d5cace0 100644 --- a/src/sna/blt.c +++ b/src/sna/blt.c @@ -50,6 +50,8 @@ memcpy_blt(const void *src, void *dst, int bpp, assert(width && height); assert(bpp >= 8); + assert((src_x + width) * bpp <= 8 * src_stride); + assert((dst_x + width) * bpp <= 8 * dst_stride); DBG(("%s: src=(%d, %d), dst=(%d, %d), size=%dx%d, pitch=%d/%d\n", __FUNCTION__, src_x, src_y, dst_x, dst_y, width, height, src_stride, dst_stride)); |