mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 19:30:11 +01:00
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:
parent
a201dfb6bf
commit
270d36da14
1 changed files with 7 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue