[Piglit] [PATCH] ext_transform_feedback-position: Fix out-of-bounds write.

Vinson Lee vlee at vmware.com
Thu Sep 8 11:26:18 PDT 2011


ext_transform_feedback-position: Fix out-of-bounds write.

Fixes a Coverity out-of-bounds write defect.

diff --git a/tests/spec/ext_transform_feedback/position.c b/tests/spec/ext_transform_feedback/position.c
index b28ecec..e952dcd 100644
--- a/tests/spec/ext_transform_feedback/position.c
+++ b/tests/spec/ext_transform_feedback/position.c
@@ -72,7 +72,7 @@ void piglit_init(int argc, char **argv)
        unsigned i;
        float data[BUF_FLOATS];
 
-       for (i = 0; i < sizeof(data); i++) {
+       for (i = 0; i < BUF_FLOATS; i++) {
                data[i] = DEFAULT_VALUE;
        }


More information about the Piglit mailing list