mesa: Fix array out-of-bounds access by _mesa_TexParameterf.
_mesa_TexParameterf calls set_tex_parameterf, which uses the params argument as an array.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user