diff options
author | Vinson Lee <vlee@vmware.com> | 2009-11-29 21:17:44 -0500 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2009-11-29 21:17:44 -0500 |
commit | 270d36da146b899d39e08f830fe34b63833a3731 (patch) | |
tree | b92017c4ca122a3604256f0150998971395a47cf | |
parent | a201dfb6bf28b89d6f511c2ec9ae0d81ef18511d (diff) |
mesa: Fix array out-of-bounds access by _mesa_TexParameterf.
_mesa_TexParameterf calls set_tex_parameterf, which uses the params
argument as an array.
-rw-r--r-- | src/mesa/main/texparam.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 032c22b252..310d594cd5 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -554,8 +554,13 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param) } break; default: - /* this will generate an error if pname is illegal */ - need_update = set_tex_parameterf(ctx, texObj, pname, ¶m); + { + /* this will generate an error if pname is illegal */ + GLfloat p[4]; + p[0] = param; + p[1] = p[2] = p[3] = 0.0F; + need_update = set_tex_parameterf(ctx, texObj, pname, p); + } } if (ctx->Driver.TexParameter && need_update) { |