diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-09 10:42:18 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-09 10:42:18 +0100 |
commit | 2e4da00e3e03b873f5cad0cc5b1f6cc791852ca5 (patch) | |
tree | f3f8bd92e68427d1ad9cdc258e6260286814f1ac /src/sna/sna_trapezoids.c | |
parent | 0464e93a088a9e8bc29ad8b36b6e12c3dda32ec6 (diff) |
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_trapezoids.c')
-rw-r--r-- | src/sna/sna_trapezoids.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |