From: Vinson Lee Date: Wed, 9 Dec 2009 20:43:28 +0000 (-0800) Subject: mesa: Fix array out-of-bounds access by _mesa_LightModelf. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=637970aefdcdd1ee50e3759de384b82e6109a45c;p=mesa.git mesa: Fix array out-of-bounds access by _mesa_LightModelf. _mesa_LightModelf calls _mesa_LightModelfv, which uses the params argument as an array. --- diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 5a8f9160f62..c1d47de3305 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -547,7 +547,10 @@ _mesa_LightModeli( GLenum pname, GLint param ) void GLAPIENTRY _mesa_LightModelf( GLenum pname, GLfloat param ) { - _mesa_LightModelfv( pname, ¶m ); + GLfloat fparam[4]; + fparam[0] = param; + fparam[1] = fparam[2] = fparam[3] = 0.0F; + _mesa_LightModelfv( pname, fparam ); }