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_LightModelf.
_mesa_LightModelf calls _mesa_LightModelfv, which uses the params argument as an array.
This commit is contained in:
parent
a082d965de
commit
637970aefd
1 changed files with 4 additions and 1 deletions
|
|
@ -547,7 +547,10 @@ _mesa_LightModeli( GLenum pname, GLint param )
|
|||
void GLAPIENTRY
|
||||
_mesa_LightModelf( GLenum pname, GLfloat param )
|
||||
{
|
||||
_mesa_LightModelfv( pname, ¶m );
|
||||
GLfloat fparam[4];
|
||||
fparam[0] = param;
|
||||
fparam[1] = fparam[2] = fparam[3] = 0.0F;
|
||||
_mesa_LightModelfv( pname, fparam );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue