projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f7c2ac
)
mesa: Fix array out-of-bounds access by _mesa_Fogf.
author
Vinson Lee
<vlee@vmware.com>
Wed, 9 Dec 2009 01:51:07 +0000
(17:51 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Wed, 9 Dec 2009 01:51:07 +0000
(17:51 -0800)
_mesa_Fogf 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 99eb141812eed3b47c473e5d6e0541ac13834cb1..269ff3f8b993bf5a33e11df4aec7bae83ac3f978 100644
(file)
--- a/
src/mesa/main/fog.c
+++ b/
src/mesa/main/fog.c
@@
-34,7
+34,10
@@
void GLAPIENTRY
_mesa_Fogf(GLenum pname, GLfloat param)
{
- _mesa_Fogfv(pname, ¶m);
+ GLfloat fparam[4];
+ fparam[0] = param;
+ fparam[1] = fparam[2] = fparam[3] = 0.0F;
+ _mesa_Fogfv(pname, fparam);
}