diff options
author | Vinson Lee <[email protected]> | 2009-11-29 18:18:23 -0500 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2009-11-29 18:18:23 -0500 |
commit | a201dfb6bf28b89d6f511c2ec9ae0d81ef18511d (patch) | |
tree | 90b78933ee33c2bfcd4e5d0b2d42800bc3ae403a /src | |
parent | 63c00c53a3019b801c5eee8a12f7862422f79f10 (diff) |
mesa: Fix array out-of-bounds access by _mesa_TexParameterf.
_mesa_TexParameterf calls set_tex_parameteri, which uses the params
argument as an array.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/texparam.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index ab170cde35b..032c22b2520 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -547,8 +547,10 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param) case GL_DEPTH_TEXTURE_MODE_ARB: { /* convert float param to int */ - GLint p = (GLint) param; - need_update = set_tex_parameteri(ctx, texObj, pname, &p); + GLint p[4]; + p[0] = (GLint) param; + p[1] = p[2] = p[3] = 0; + need_update = set_tex_parameteri(ctx, texObj, pname, p); } break; default: |