From: Vinson Lee Date: Sun, 29 Nov 2009 04:47:23 +0000 (-0500) Subject: mesa: Fix array out-of-bounds access by _mesa_TexGeni. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d55fb7c835b56951f05a058083e7eda264ba192e;p=mesa.git mesa: Fix array out-of-bounds access by _mesa_TexGeni. _mesa_TexGeni calls _mesa_TexGeniv, which uses the params argument as an array. --- diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c index 733e129fcfe..087f66bbf35 100644 --- a/src/mesa/main/texgen.c +++ b/src/mesa/main/texgen.c @@ -218,7 +218,10 @@ _mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param ) void GLAPIENTRY _mesa_TexGeni( GLenum coord, GLenum pname, GLint param ) { - _mesa_TexGeniv( coord, pname, ¶m ); + GLint p[4]; + p[0] = param; + p[1] = p[2] = p[3] = 0; + _mesa_TexGeniv( coord, pname, p ); }