summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-11-28 23:47:23 -0500
committerVinson Lee <[email protected]>2009-12-05 12:59:34 -0800
commitd74cd04e6190ebb3a9c53d45cbb2452d92e24ad5 (patch)
treed9847037e0ed332f009176363e78576ee562c3d2
parentca8a2150c79899bad0f80e132656863822db045e (diff)
mesa: Fix array out-of-bounds access by _mesa_TexGeni.
_mesa_TexGeni calls _mesa_TexGeniv, which uses the params argument as an array. (cherry picked from commit d55fb7c835b56951f05a058083e7eda264ba192e)
-rw-r--r--src/mesa/main/texgen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c
index e3feb024c31..13b33745b86 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -213,7 +213,10 @@ _mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param )
void GLAPIENTRY
_mesa_TexGeni( GLenum coord, GLenum pname, GLint param )
{
- _mesa_TexGeniv( coord, pname, &param );
+ GLint p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0;
+ _mesa_TexGeniv( coord, pname, p );
}