diff options
author | Vinson Lee <vlee@freedesktop.org> | 2014-01-18 20:32:21 -0800 |
---|---|---|
committer | Vinson Lee <vlee@freedesktop.org> | 2014-01-20 12:23:19 -0800 |
commit | a44362736efb1413038912e04d31f845a00ac482 (patch) | |
tree | 25bbcedff3c63be21bfb43b341812773bf6f7970 /tests/general/hiz.c | |
parent | 2c6ffc6f96c89a2ab9f643fc50bb37c05cd1cff9 (diff) |
hiz: Explicitly use sizeof(float) in malloc.
Silences "Allocation size mismatch" defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'tests/general/hiz.c')
-rw-r--r-- | tests/general/hiz.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/general/hiz.c b/tests/general/hiz.c index a64225683..10fa53ce2 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 */ |