From 2e4da00e3e03b873f5cad0cc5b1f6cc791852ca5 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 9 Apr 2012 10:42:18 +0100 Subject: sna/traps: Assert that the inplace row is contained before writing References: https://bugs.freedesktop.org/show_bug.cgi?id=48332 Signed-off-by: Chris Wilson --- src/sna/sna_trapezoids.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sna/sna_trapezoids.c') diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c index dbf581e2..f7a21110 100644 --- a/src/sna/sna_trapezoids.c +++ b/src/sna/sna_trapezoids.c @@ -1786,6 +1786,7 @@ tor_inplace(struct tor *converter, PixmapPtr scratch, int mono, uint8_t *buf) inplace_subrow(active, ptr, width, &min, &max); } + assert(min >= 0 && max <= width); memset(row, 0, min); if (max > min) inplace_end_subrows(active, row+min, (int8_t*)ptr+min, max-min); -- cgit v1.2.3