diff options
author | Vinson Lee <[email protected]> | 2009-11-28 22:04:06 -0500 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2009-12-04 17:48:30 -0800 |
commit | fe8e18bcd41a19282ba92350a04a34866fda1d7b (patch) | |
tree | 178f07f311f638c796b90cc880acad32e8b90cc0 | |
parent | 4fb5ae7233e5c358e579ced6155f32461f6edf2d (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)
-rw-r--r-- | src/mesa/main/texenv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c index 6d86a4275cc..4442fb8cf8e 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, ¶m ); + GLfloat p[4]; + p[0] = param; + p[1] = p[2] = p[3] = 0.0; + _mesa_TexEnvfv( target, pname, p ); } |