projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34528a3
)
mesa: Fix array out-of-bounds access by _mesa_Lighti.
author
Vinson Lee
<vlee@vmware.com>
Thu, 10 Dec 2009 01:34:50 +0000
(17:34 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Thu, 10 Dec 2009 01:34:50 +0000
(17:34 -0800)
_mesa_Lighti calls _mesa_Lightiv, which uses the params argument
as an array.
src/mesa/main/light.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/light.c
b/src/mesa/main/light.c
index d4f3bb9026513a34889e0ee4186782b483e383d4..5150926159e51f4c0d375cc5002c569e8354c89c 100644
(file)
--- a/
src/mesa/main/light.c
+++ b/
src/mesa/main/light.c
@@
-288,7
+288,10
@@
_mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params )
void GLAPIENTRY
_mesa_Lighti( GLenum light, GLenum pname, GLint param )
{
- _mesa_Lightiv( light, pname, ¶m );
+ GLint iparam[4];
+ iparam[0] = param;
+ iparam[1] = iparam[2] = iparam[3] = 0;
+ _mesa_Lightiv( light, pname, iparam );
}