From: Brian Paul Date: Mon, 24 Jun 2013 20:48:57 +0000 (-0600) Subject: svga: add array index assertion in svga_validate_sampler_view() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a4e4a413e5b24d36ac135a2eb42d5e57b8b4ccca;p=mesa.git svga: add array index assertion in svga_validate_sampler_view() --- diff --git a/src/gallium/drivers/svga/svga_sampler_view.c b/src/gallium/drivers/svga/svga_sampler_view.c index 1950784a15a..2c846b29a44 100644 --- a/src/gallium/drivers/svga/svga_sampler_view.c +++ b/src/gallium/drivers/svga/svga_sampler_view.c @@ -191,6 +191,7 @@ svga_validate_sampler_view(struct svga_context *svga, struct svga_sampler_view * for (i = v->min_lod; i <= v->max_lod; i++) { for (k = 0; k < numFaces; k++) { + assert(i < Elements(tex->view_age)); if (v->age < tex->view_age[i]) svga_texture_copy_handle(svga, tex->handle, 0, 0, 0, i, k,