From: Vinson Lee Date: Thu, 10 Dec 2009 01:34:50 +0000 (-0800) Subject: mesa: Fix array out-of-bounds access by _mesa_Lighti. X-Git-Tag: mesa-7.8~1360^2~370^2~73 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=444d1f39108ab4419843f19f76c968cef3398bab;p=platform%2Fupstream%2Fmesa.git mesa: Fix array out-of-bounds access by _mesa_Lighti. _mesa_Lighti calls _mesa_Lightiv, which uses the params argument as an array. --- diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index d4f3bb90265..5150926159e 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -288,7 +288,10 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ) void GLAPIENTRY _mesa_Lighti( GLenum light, GLenum pname, GLint param ) { - _mesa_Lightiv( light, pname, ¶m ); + GLint iparam[4]; + iparam[0] = param; + iparam[1] = iparam[2] = iparam[3] = 0; + _mesa_Lightiv( light, pname, iparam ); }