From: Vinson Lee Date: Wed, 9 Dec 2009 00:04:33 +0000 (-0800) Subject: mesa: Fix array out-of-bounds access by _mesa_Fogi. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7f146b38240e1c4efa6d8d0a4e5a0c8346706de5;p=mesa.git mesa: Fix array out-of-bounds access by _mesa_Fogi. _mesa_Fogi calls _mesa_Fogfv, which uses the params argument as an array. --- diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c index 4323d3db820..99eb141812e 100644 --- a/src/mesa/main/fog.c +++ b/src/mesa/main/fog.c @@ -41,8 +41,10 @@ _mesa_Fogf(GLenum pname, GLfloat param) void GLAPIENTRY _mesa_Fogi(GLenum pname, GLint param ) { - GLfloat fparam = (GLfloat) param; - _mesa_Fogfv(pname, &fparam); + GLfloat fparam[4]; + fparam[0] = (GLfloat) param; + fparam[1] = fparam[2] = fparam[3] = 0.0F; + _mesa_Fogfv(pname, fparam); }