summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-12-09 17:11:30 -0800
committerVinson Lee <vlee@vmware.com>2009-12-09 17:11:30 -0800
commit34528a34c446afea4442f479713e7f926220f128 (patch)
treeddcb60bc9bd6597ef751b3c48f65fb58fd2a324d /src/mesa
parent348883076bd213ec733a1ba2a4768788e4669c97 (diff)
downloadexternal_mesa3d-34528a34c446afea4442f479713e7f926220f128.zip
external_mesa3d-34528a34c446afea4442f479713e7f926220f128.tar.gz
external_mesa3d-34528a34c446afea4442f479713e7f926220f128.tar.bz2
mesa: Fix array out-of-bounds access by _mesa_Lightf.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/light.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index c1d47de..d4f3bb9 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -206,7 +206,10 @@ _mesa_light(GLcontext *ctx, GLuint lnum, GLenum pname, const GLfloat *params)
void GLAPIENTRY
_mesa_Lightf( GLenum light, GLenum pname, GLfloat param )
{
- _mesa_Lightfv( light, pname, &param );
+ GLfloat fparam[4];
+ fparam[0] = param;
+ fparam[1] = fparam[2] = fparam[3] = 0.0F;
+ _mesa_Lightfv( light, pname, fparam );
}