summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-11-28 22:04:06 -0500
committerVinson Lee <vlee@vmware.com>2009-11-28 22:08:20 -0500
commita11d60d14caf8efc07f70af63b57b33273f8cf9b (patch)
tree6302b6272767b4588917d456b129ea6e67ec818f /src
parente5159996a43d64f71d44dd2bd477d10e37ec9a27 (diff)
mesa: Fix array out-of-bounds access in _mesa_TexEnvf.
_mesa_TexEnvf calls _mesa_TexEnvfv, which uses the param argument as an array.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/texenv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index 6d86a4275c..4442fb8cf8 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, &param );
+ GLfloat p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0.0;
+ _mesa_TexEnvfv( target, pname, p );
}