projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63c00c5
)
mesa: Fix array out-of-bounds access by _mesa_TexParameterf.
author
Vinson Lee
<vlee@vmware.com>
Sun, 29 Nov 2009 23:18:23 +0000
(18:18 -0500)
committer
Vinson Lee
<vlee@vmware.com>
Sun, 29 Nov 2009 23:18:23 +0000
(18:18 -0500)
_mesa_TexParameterf calls set_tex_parameteri, which uses the params
argument as an array.
src/mesa/main/texparam.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/texparam.c
b/src/mesa/main/texparam.c
index ab170cde35be35435722bdf394c98fdc047f80c0..032c22b252018d3bc52b90887503e5695cf37619 100644
(file)
--- a/
src/mesa/main/texparam.c
+++ b/
src/mesa/main/texparam.c
@@
-547,8
+547,10
@@
_mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
case GL_DEPTH_TEXTURE_MODE_ARB:
{
/* convert float param to int */
- GLint p = (GLint) param;
- need_update = set_tex_parameteri(ctx, texObj, pname, &p);
+ GLint p[4];
+ p[0] = (GLint) param;
+ p[1] = p[2] = p[3] = 0;
+ need_update = set_tex_parameteri(ctx, texObj, pname, p);
}
break;
default: