From: Vinson Lee Date: Wed, 9 Dec 2009 01:51:07 +0000 (-0800) Subject: mesa: Fix array out-of-bounds access by _mesa_Fogf. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d33bf38d63d233f6a09115acfff230c464d3ee29;p=mesa.git mesa: Fix array out-of-bounds access by _mesa_Fogf. _mesa_Fogf 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 99eb141812e..269ff3f8b99 100644 --- a/src/mesa/main/fog.c +++ b/src/mesa/main/fog.c @@ -34,7 +34,10 @@ void GLAPIENTRY _mesa_Fogf(GLenum pname, GLfloat param) { - _mesa_Fogfv(pname, ¶m); + GLfloat fparam[4]; + fparam[0] = param; + fparam[1] = fparam[2] = fparam[3] = 0.0F; + _mesa_Fogfv(pname, fparam); }