Mesa (mesa_7_6_branch): mesa: Fix array out-of-bounds access by _mesa_TexParameteri.
Vinson Lee
vlee at kemper.freedesktop.org
Wed Dec 9 01:36:25 UTC 2009
Module: Mesa
Branch: mesa_7_6_branch
Commit: 3f7c2ac2798b385bed97b6931a1568a7e0223a0a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f7c2ac2798b385bed97b6931a1568a7e0223a0a
Author: Vinson Lee <vlee at vmware.com>
Date: Tue Dec 8 17:25:05 2009 -0800
mesa: Fix array out-of-bounds access by _mesa_TexParameteri.
_mesa_TexParameteri calls set_tex_parameteri, which uses the
params argument as an array.
---
src/mesa/main/texparam.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 59c518c..1cec4b8 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, ¶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) {
More information about the mesa-commit
mailing list