Silences "Allocation size mismatch" defect reported by Coverity.

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

diff --git a/tests/general/hiz.c b/tests/general/hiz.c
index a642256..10fa53c 100644
--- a/tests/general/hiz.c
+++ b/tests/general/hiz.c
@@ -162,7 +162,7 @@ GLboolean test_less()
        glVertex3fv(v23);
        glEnd();
 
-       pix = malloc(piglit_width * piglit_height * 12);
+       pix = malloc(piglit_width * piglit_height * 3 * sizeof(float));
        glReadPixels(0, 0, piglit_width, piglit_height, GL_RGB, GL_FLOAT, pix);
 
        /* check pixels */
-- 
1.8.3.2

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

Reply via email to