From: Vinson Lee Date: Sun, 29 Nov 2009 03:04:06 +0000 (-0500) Subject: mesa: Fix array out-of-bounds access in _mesa_TexEnvf. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe8e18bcd41a19282ba92350a04a34866fda1d7b;p=mesa.git mesa: Fix array out-of-bounds access in _mesa_TexEnvf. _mesa_TexEnvf calls _mesa_TexEnvfv, which uses the param argument as an array. (cherry picked from commit a11d60d14caf8efc07f70af63b57b33273f8cf9b) --- diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c index 6d86a4275cc..4442fb8cf8e 100644 --- a/src/mesa/main/texenv.c +++ b/src/mesa/main/texenv.c @@ -598,7 +598,10 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) void GLAPIENTRY _mesa_TexEnvf( GLenum target, GLenum pname, GLfloat param ) { - _mesa_TexEnvfv( target, pname, ¶m ); + GLfloat p[4]; + p[0] = param; + p[1] = p[2] = p[3] = 0.0; + _mesa_TexEnvfv( target, pname, p ); }