projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
444d1f3
)
mesa: Fix array out-of-bounds access by _mesa_TexGend.
author
Vinson Lee
<vlee@vmware.com>
Thu, 10 Dec 2009 01:59:23 +0000
(17:59 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Thu, 10 Dec 2009 01:59:23 +0000
(17:59 -0800)
_mesa_TexGend calls _mesa_TexGenfv, which uses the params argument
as an array.
src/mesa/main/texgen.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/texgen.c
b/src/mesa/main/texgen.c
index d3ea7b936b3997b791514fa689923bc6a15f6fe2..f9d38215d6031fac15f21bb576e569f0724a6aa0 100644
(file)
--- a/
src/mesa/main/texgen.c
+++ b/
src/mesa/main/texgen.c
@@
-181,8
+181,10
@@
_mesa_TexGeniv(GLenum coord, GLenum pname, const GLint *params )
void GLAPIENTRY
_mesa_TexGend(GLenum coord, GLenum pname, GLdouble param )
{
- GLfloat p = (GLfloat) param;
- _mesa_TexGenfv( coord, pname, &p );
+ GLfloat p[4];
+ p[0] = (GLfloat) param;
+ p[1] = p[2] = p[3] = 0.0F;
+ _mesa_TexGenfv( coord, pname, p );
}