summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-11-29 00:50:48 -0500
committerVinson Lee <[email protected]>2009-11-29 00:50:48 -0500
commitca5a7aadb4361e7d053aea8687372cd44cbd8795 (patch)
treeb2e434a517c8986519e4e9e9ae47e2b619e8e1a4
parentd55fb7c835b56951f05a058083e7eda264ba192e (diff)
mesa: Fix array out-of-bounds access by _mesa_TexGenf.
_mesa_TexGenf calls _mesa_TexGenfv, which uses the params argument as an array.
-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 087f66bbf35..5abb1ff0ab6 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -211,7 +211,10 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
static void GLAPIENTRY
_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param )
{
- _mesa_TexGenfv(coord, pname, &param);
+ GLfloat p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0.0F;
+ _mesa_TexGenfv(coord, pname, p);
}