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

This commit is contained in:
Vinson Lee 2009-12-10 12:11:09 -08:00
parent b827578805
commit dcb4a37fc8
1 changed files with 4 additions and 2 deletions

View File

@ -700,8 +700,10 @@ _mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params)
case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
{
/* convert int param to float */
GLfloat fparam = (GLfloat) params[0];
need_update = set_tex_parameterf(ctx, texObj, pname, &fparam);
GLfloat fparams[4];
fparams[0] = (GLfloat) params[0];
fparams[1] = fparams[2] = fparams[3] = 0.0F;
need_update = set_tex_parameterf(ctx, texObj, pname, fparams);
}
break;
default: