projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f146b3
)
mesa: Fix array out-of-bounds access by _mesa_TexParameteri.
author
Vinson Lee
<vlee@vmware.com>
Wed, 9 Dec 2009 01:25:05 +0000
(17:25 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Wed, 9 Dec 2009 01:25:05 +0000
(17:25 -0800)
_mesa_TexParameteri 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 59c518c7d2512fca006edac3ad83c8ef0fc001b9..1cec4b82fea8c5481ff7e177450cfa7b2c6077e5 100644
(file)
--- a/
src/mesa/main/texparam.c
+++ b/
src/mesa/main/texparam.c
@@
-653,7
+653,12
@@
_mesa_TexParameteri(GLenum target, GLenum pname, GLint param)
break;
default:
/* this will generate an error if pname is illegal */
- need_update = set_tex_parameteri(ctx, texObj, pname, ¶m);
+ {
+ GLint iparam[4];
+ iparam[0] = param;
+ iparam[1] = iparam[2] = iparam[3] = 0;
+ need_update = set_tex_parameteri(ctx, texObj, pname, iparam);
+ }
}
if (ctx->Driver.TexParameter && need_update) {