projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a082d96
)
mesa: Fix array out-of-bounds access by _mesa_LightModelf.
author
Vinson Lee
<vlee@vmware.com>
Wed, 9 Dec 2009 20:43:28 +0000
(12:43 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Wed, 9 Dec 2009 20:43:28 +0000
(12:43 -0800)
_mesa_LightModelf calls _mesa_LightModelfv, 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 5a8f9160f6241efab8a0bcdd95a39e8e61a3b348..c1d47de330564c7f2af7b0a77ba5c3f30ee5cb08 100644
(file)
--- 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 );
}