mesa: Fix array out-of-bounds access by _mesa_PointParameterf.
authorVinson Lee <vlee@vmware.com>
Wed, 9 Dec 2009 21:00:22 +0000 (13:00 -0800)
committerVinson Lee <vlee@vmware.com>
Wed, 9 Dec 2009 21:00:22 +0000 (13:00 -0800)
_mesa_PointParameterf calls _mesa_PointParameterfv, which uses the
params argument as an array.

src/mesa/main/points.c

index b3305448904a9e045f3c1cb095941d1280a93e46..9ec21c9b7679ff251563b852b7e016bf42f58123 100644 (file)
@@ -90,7 +90,10 @@ _mesa_PointParameteriv( GLenum pname, const GLint *params )
 void GLAPIENTRY
 _mesa_PointParameterf( GLenum pname, GLfloat param)
 {
-   _mesa_PointParameterfv(pname, &param);
+   GLfloat p[3];
+   p[0] = param;
+   p[1] = p[2] = 0.0F;
+   _mesa_PointParameterfv(pname, p);
 }