mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
mesa: Fix array out-of-bounds access by _mesa_TexParameterf.
_mesa_TexParameterf calls set_tex_parameteri, which uses the params
argument as an array.
(cherry picked from commit a201dfb6bf)
This commit is contained in:
parent
1446f30875
commit
4071d065c2
1 changed files with 4 additions and 2 deletions
|
|
@ -544,8 +544,10 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
|
|||
case GL_DEPTH_TEXTURE_MODE_ARB:
|
||||
{
|
||||
/* convert float param to int */
|
||||
GLint p = (GLint) param;
|
||||
need_update = set_tex_parameteri(ctx, texObj, pname, &p);
|
||||
GLint p[4];
|
||||
p[0] = (GLint) param;
|
||||
p[1] = p[2] = p[3] = 0;
|
||||
need_update = set_tex_parameteri(ctx, texObj, pname, p);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue