summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-12-08 17:25:05 -0800
committerVinson Lee <[email protected]>2009-12-08 17:25:05 -0800
commit3f7c2ac2798b385bed97b6931a1568a7e0223a0a (patch)
tree4c0e58ea170b8c89c4762e2d41d4b73fa9b9cf57 /src/mesa/main
parent7f146b38240e1c4efa6d8d0a4e5a0c8346706de5 (diff)
mesa: Fix array out-of-bounds access by _mesa_TexParameteri.
_mesa_TexParameteri calls set_tex_parameteri, which uses the params argument as an array.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/texparam.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 59c518c7d25..1cec4b82fea 100644
--- 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, &param);
+ {
+ 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) {