From 637970aefdcdd1ee50e3759de384b82e6109a45c Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 9 Dec 2009 12:43:28 -0800 Subject: [PATCH] mesa: Fix array out-of-bounds access by _mesa_LightModelf. _mesa_LightModelf calls _mesa_LightModelfv, which uses the params argument as an array. --- src/mesa/main/light.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 ); } -- 2.30.2