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-12-04 17:48:30 -0800
commitfe8e18bcd41a19282ba92350a04a34866fda1d7b (patch)
tree178f07f311f638c796b90cc880acad32e8b90cc0 /src
parent4fb5ae7233e5c358e579ced6155f32461f6edf2d (diff)
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)
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 );
}