Mesa (mesa_7_6_branch): mesa: Fix array out-of-bounds access by _mesa_PointParameteri.
Vinson Lee
vlee at kemper.freedesktop.org
Wed Dec 9 21:16:15 UTC 2009
Module: Mesa
Branch: mesa_7_6_branch
Commit: 348883076bd213ec733a1ba2a4768788e4669c97
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=348883076bd213ec733a1ba2a4768788e4669c97
Author: Vinson Lee <vlee at vmware.com>
Date: Wed Dec 9 13:15:05 2009 -0800
mesa: Fix array out-of-bounds access by _mesa_PointParameteri.
_mesa_PointParameteri calls _mesa_PointParameterfv, which uses the
params argument as an array.
---
src/mesa/main/points.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 9ec21c9..dcaeccd 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -69,8 +69,10 @@ _mesa_PointSize( GLfloat size )
void GLAPIENTRY
_mesa_PointParameteri( GLenum pname, GLint param )
{
- const GLfloat value = (GLfloat) param;
- _mesa_PointParameterfv(pname, &value);
+ GLfloat p[3];
+ p[0] = (GLfloat) param;
+ p[1] = p[2] = 0.0F;
+ _mesa_PointParameterfv(pname, p);
}
More information about the mesa-commit
mailing list