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

Signed-off-by: Vinson Lee <[email protected]>
---
 tests/spec/arb_compute_shader/cs-ids-common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/spec/arb_compute_shader/cs-ids-common.c 
b/tests/spec/arb_compute_shader/cs-ids-common.c
index 0f67f43..e05587f 100644
--- a/tests/spec/arb_compute_shader/cs-ids-common.c
+++ b/tests/spec/arb_compute_shader/cs-ids-common.c
@@ -333,15 +333,15 @@ cs_ids_test_all_sizes()
        uint32_t x, y, z;
 
 
-       for (zi = 0; zi <= ARRAY_SIZE(sizes); zi++) {
+       for (zi = 0; zi < ARRAY_SIZE(sizes); zi++) {
                z = sizes[zi];
                if (z > 64)
                        break;
-               for (yi = 0; yi <= ARRAY_SIZE(sizes); yi++) {
+               for (yi = 0; yi < ARRAY_SIZE(sizes); yi++) {
                        y = sizes[yi];
                        if ((y * z) > 1024)
                                break;
-                       for (xi = 0; xi <= ARRAY_SIZE(sizes); xi++) {
+                       for (xi = 0; xi < ARRAY_SIZE(sizes); xi++) {
                                x = sizes[xi];
                                if ((x * y * z) > 1024)
                                        break;
-- 
2.4.9 (Apple Git-60)

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

Reply via email to