mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
mesa: Fix array out-of-bounds access by _mesa_TexParameteri.
_mesa_TexParameteri calls set_tex_parameteri, which uses the params argument as an array.
This commit is contained in:
parent
7f146b3824
commit
3f7c2ac279
1 changed files with 6 additions and 1 deletions
|
|
@ -653,7 +653,12 @@ _mesa_TexParameteri(GLenum target, GLenum pname, GLint param)
|
|||
break;
|
||||
default:
|
||||
/* this will generate an error if pname is illegal */
|
||||
need_update = set_tex_parameteri(ctx, texObj, pname, ¶m);
|
||||
{
|
||||
GLint iparam[4];
|
||||
iparam[0] = param;
|
||||
iparam[1] = iparam[2] = iparam[3] = 0;
|
||||
need_update = set_tex_parameteri(ctx, texObj, pname, iparam);
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->Driver.TexParameter && need_update) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue