From 34528a34c446afea4442f479713e7f926220f128 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 9 Dec 2009 17:11:30 -0800 Subject: [PATCH] mesa: Fix array out-of-bounds access by _mesa_Lightf. --- 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 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 ); } -- 2.30.2