mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02: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.
(cherry picked from commit 270d36da14)
This commit is contained in:
parent
4071d065c2
commit
ca8a2150c7
1 changed files with 7 additions and 2 deletions
|
|
@ -551,8 +551,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