Skip to content
Snippets Groups Projects
Commit a1d46fbe authored by Vinson Lee's avatar Vinson Lee
Browse files

mesa: Fix array out-of-bounds access by _mesa_TexParameteri.

_mesa_TexParameteri calls set_tex_parameterf, which uses the
params argument as an array.
parent d88f3b94
No related branches found
No related tags found
No related merge requests found
......@@ -644,9 +644,11 @@ _mesa_TexParameteri(GLenum target, GLenum pname, GLint param)
case GL_TEXTURE_LOD_BIAS:
case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
{
GLfloat fparam = (GLfloat) param;
GLfloat fparam[4];
fparam[0] = (GLfloat) param;
fparam[1] = fparam[2] = fparam[3] = 0.0F;
/* convert int param to float */
need_update = set_tex_parameterf(ctx, texObj, pname, &fparam);
need_update = set_tex_parameterf(ctx, texObj, pname, fparam);
}
break;
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment