summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-12-09 13:15:05 -0800
committerVinson Lee <vlee@vmware.com>2009-12-09 13:15:05 -0800
commit348883076bd213ec733a1ba2a4768788e4669c97 (patch)
treeff4a521e1c0ed0e5427b95852ab360e80d7b1ba9 /src/mesa
parent6f2d51b81ff907af9727e90153a46e79e246fc66 (diff)
mesa: Fix array out-of-bounds access by _mesa_PointParameteri.
_mesa_PointParameteri calls _mesa_PointParameterfv, which uses the params argument as an array.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/points.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 9ec21c9b76..dcaeccd90d 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);
}