projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1d46fb
)
mesa: Fix array out-of-bounds access by _mesa_Fogi.
author
Vinson Lee
<vlee@vmware.com>
Wed, 9 Dec 2009 00:04:33 +0000
(16:04 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Wed, 9 Dec 2009 00:08:41 +0000
(16:08 -0800)
_mesa_Fogi calls _mesa_Fogfv, which uses the params argument
as an array.
src/mesa/main/fog.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/fog.c
b/src/mesa/main/fog.c
index 4323d3db8206a19c57a038f482e67164bd57d04d..99eb141812eed3b47c473e5d6e0541ac13834cb1 100644
(file)
--- a/
src/mesa/main/fog.c
+++ b/
src/mesa/main/fog.c
@@
-41,8
+41,10
@@
_mesa_Fogf(GLenum pname, GLfloat param)
void GLAPIENTRY
_mesa_Fogi(GLenum pname, GLint param )
{
- GLfloat fparam = (GLfloat) param;
- _mesa_Fogfv(pname, &fparam);
+ GLfloat fparam[4];
+ fparam[0] = (GLfloat) param;
+ fparam[1] = fparam[2] = fparam[3] = 0.0F;
+ _mesa_Fogfv(pname, fparam);
}