aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/light.c
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-12-08 18:26:05 -0800
committerVinson Lee <[email protected]>2009-12-08 18:26:05 -0800
commitaf16c822a5af8ce0aa7582e8ea44315b62b7356b (patch)
tree4591a62571814d66f57862aa236a614f139b401e /src/mesa/main/light.c
parentd33bf38d63d233f6a09115acfff230c464d3ee29 (diff)
mesa: Fix array out-of-bounds access by _mesa_LightModeli.
_mesa_LightModeli calls _mesa_LightModeliv, which uses the params argument as an array.
Diffstat (limited to 'src/mesa/main/light.c')
-rw-r--r--src/mesa/main/light.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 10c89f43688..5a8f9160f62 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -537,7 +537,10 @@ _mesa_LightModeliv( GLenum pname, const GLint *params )
void GLAPIENTRY
_mesa_LightModeli( GLenum pname, GLint param )
{
- _mesa_LightModeliv( pname, &param );
+ GLint iparam[4];
+ iparam[0] = param;
+ iparam[1] = iparam[2] = iparam[3] = 0;
+ _mesa_LightModeliv( pname, iparam );
}