Module: Mesa
Branch: master
Commit: a4e4a413e5b24d36ac135a2eb42d5e57b8b4ccca
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a4e4a413e5b24d36ac135a2eb42d5e57b8b4ccca

Author: Brian Paul <[email protected]>
Date:   Mon Jun 24 14:48:57 2013 -0600

svga: add array index assertion in svga_validate_sampler_view()

---

 src/gallium/drivers/svga/svga_sampler_view.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_sampler_view.c 
b/src/gallium/drivers/svga/svga_sampler_view.c
index 1950784..2c846b2 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,

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to