[Piglit] [PATCH] glsl-1.50/execution/geometry: Fix out-of-bounds read.

Vinson Lee vlee at freedesktop.org
Sun Mar 22 00:29:42 PDT 2015


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

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 .../geometry/geometry-end-primitive-optional-with-points-out.c          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/spec/glsl-1.50/execution/geometry/geometry-end-primitive-optional-with-points-out.c b/tests/spec/glsl-1.50/execution/geometry/geometry-end-primitive-optional-with-points-out.c
index 5b8d2d5..a881330 100644
--- a/tests/spec/glsl-1.50/execution/geometry/geometry-end-primitive-optional-with-points-out.c
+++ b/tests/spec/glsl-1.50/execution/geometry/geometry-end-primitive-optional-with-points-out.c
@@ -139,7 +139,7 @@ probe_pixel_rgb_neighborhood(int x, int y, const float expected[3])
 
 	glReadPixels(x - 2, y - 2, 5, 5, GL_RGBA, GL_FLOAT, pixels);
 	for (j = 0; j < 5; j++) {
-		for (i = 0; i <= 5; i++) {
+		for (i = 0; i < 5; i++) {
 			float *p = pixels[j][i];
 
 			for (k = 0; k < 3; k++) {
-- 
2.3.3



More information about the Piglit mailing list