From: Vinson Lee Date: Thu, 10 Dec 2009 01:11:30 +0000 (-0800) Subject: mesa: Fix array out-of-bounds access by _mesa_Lightf. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34528a34c446afea4442f479713e7f926220f128;p=mesa.git mesa: Fix array out-of-bounds access by _mesa_Lightf. --- diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index c1d47de3305..d4f3bb90265 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, ¶m ); + GLfloat fparam[4]; + fparam[0] = param; + fparam[1] = fparam[2] = fparam[3] = 0.0F; + _mesa_Lightfv( light, pname, fparam ); }