Fixes out-of-bounds read defect reported by Coverity.

Signed-off-by: Vinson Lee <[email protected]>
---
 tests/shaders/glsl-routing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/shaders/glsl-routing.c b/tests/shaders/glsl-routing.c
index 4b7e46f..5a1b5d9 100644
--- a/tests/shaders/glsl-routing.c
+++ b/tests/shaders/glsl-routing.c
@@ -213,7 +213,7 @@ static GLboolean test(unsigned vsbitmask, unsigned 
fsbitmask, int line)
     }
     assert(glGetError() == 0);
 
-    for (i = 0; i <= ATTRIBS; i++) {
+    for (i = 0; i < ATTRIBS; i++) {
         if (((1 << i) & vsbitmask) && ((1 << i) & fsbitmask)) {
             pass = piglit_probe_pixel_rgb(7 + (i*(BOX_SIZE+5)), 7 + height, 
&input[i*4]) && pass;
         }
-- 
1.8.0.1

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to