projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e515999
)
mesa: Fix array out-of-bounds access in _mesa_TexEnvf.
author
Vinson Lee
<vlee@vmware.com>
Sun, 29 Nov 2009 03:04:06 +0000
(22:04 -0500)
committer
Vinson Lee
<vlee@vmware.com>
Sun, 29 Nov 2009 03:08:20 +0000
(22:08 -0500)
_mesa_TexEnvf calls _mesa_TexEnvfv, which uses the param argument
as an array.
src/mesa/main/texenv.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/texenv.c
b/src/mesa/main/texenv.c
index 6d86a4275cc4c05b82a764fbe3435454b18cdfd0..4442fb8cf8e9877a55bc085d313bcdb2a1d6f3ce 100644
(file)
--- 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 );
}