projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54b0ed8
)
mesa: Fix array out-of-bounds access by _mesa_TexParameterfv.
author
Vinson Lee
<vlee@vmware.com>
Tue, 8 Dec 2009 22:31:38 +0000
(14:31 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Tue, 8 Dec 2009 22:33:33 +0000
(14:33 -0800)
_mesa_TexParameterfv 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 4ce8c8593a9e73647b3c73a807975dadd5e98d10..4c1f690ff1c0c4e03130f7d14d6d2dec0010a147 100644
(file)
--- a/
src/mesa/main/texparam.c
+++ b/
src/mesa/main/texparam.c
@@
-592,8
+592,10
@@
_mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
case GL_DEPTH_TEXTURE_MODE_ARB:
{
/* convert float param to int */
- GLint p = (GLint) params[0];
- need_update = set_tex_parameteri(ctx, texObj, pname, &p);
+ GLint p[4];
+ p[0] = (GLint) params[0];
+ p[1] = p[2] = p[3] = 0;
+ need_update = set_tex_parameteri(ctx, texObj, pname, p);
}
break;