diff options
author | Vinson Lee <vlee@freedesktop.org> | 2015-02-20 00:11:49 -0800 |
---|---|---|
committer | Vinson Lee <vlee@freedesktop.org> | 2015-03-24 22:55:35 -0700 |
commit | 198d6e9968787bfeeae5cd149a7bd2c40c1f7775 (patch) | |
tree | bba87b2140c7499869a92097cd1e58d06cb78825 | |
parent | ad264160544aa66648bb2a7e0fc785f234a711b1 (diff) |
arb_pipeline_statistics_query-comp: Fix out-of-bounds reads.
Fix out-of-bounds read defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r-- | tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c index c980095ae..47a36b0fd 100644 --- a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c +++ b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c @@ -122,15 +122,15 @@ test_all_sizes_for_query(void) uint32_t xi, yi, zi; 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; |