From: Brian Date: Wed, 8 Aug 2007 22:07:28 +0000 (-0600) Subject: added assertion X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ed227b7b8ddc3aad6ed764124e94caae6b98d182;p=mesa.git added assertion --- diff --git a/src/mesa/pipe/softpipe/sp_surface.c b/src/mesa/pipe/softpipe/sp_surface.c index 85e1fcfa38f..174dcc01692 100644 --- a/src/mesa/pipe/softpipe/sp_surface.c +++ b/src/mesa/pipe/softpipe/sp_surface.c @@ -323,6 +323,8 @@ a8r8g8b8_get_tile(struct pipe_surface *ps, const GLuint *src = ((const GLuint *) ps->region->map) + y * ps->region->pitch + x; GLuint i, j; + assert(x + w <= ps->width); + assert(y + h <= ps->height); for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { p[0] = UBYTE_TO_FLOAT((src[j] >> 16) & 0xff);