diff options
author | Vinson Lee <[email protected]> | 2009-12-09 12:43:28 -0800 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2009-12-09 12:43:28 -0800 |
commit | 637970aefdcdd1ee50e3759de384b82e6109a45c (patch) | |
tree | 3980db6ea0c3bc3243f69ab242a97d7bcc446e05 /src/mesa | |
parent | a082d965de228d5035e59245df528af62761652a (diff) |
mesa: Fix array out-of-bounds access by _mesa_LightModelf.
_mesa_LightModelf calls _mesa_LightModelfv, which uses the
params argument as an array.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/light.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 5a8f9160f62..c1d47de3305 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -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 ); } |