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