Mesa (mesa_7_6_branch): mesa: Fix array out-of-bounds access in _mesa_TexEnvf.
Vinson Lee
vlee at kemper.freedesktop.org
Sat Dec 5 01:49:43 UTC 2009
Module: Mesa
Branch: mesa_7_6_branch
Commit: fe8e18bcd41a19282ba92350a04a34866fda1d7b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fe8e18bcd41a19282ba92350a04a34866fda1d7b
Author: Vinson Lee <vlee at vmware.com>
Date: Sat Nov 28 22:04:06 2009 -0500
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)
---
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 6d86a42..4442fb8 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 );
}
More information about the mesa-commit
mailing list