summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-12-08 17:51:07 -0800
committerVinson Lee <[email protected]>2009-12-08 17:51:07 -0800
commitd33bf38d63d233f6a09115acfff230c464d3ee29 (patch)
tree6f334b1800c9f0150eaacc532d37181e0b5fa476 /src/mesa
parent3f7c2ac2798b385bed97b6931a1568a7e0223a0a (diff)
mesa: Fix array out-of-bounds access by _mesa_Fogf.
_mesa_Fogf calls _mesa_Fogfv, which uses the params argument as an array.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/fog.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c
index 99eb141812e..269ff3f8b99 100644
--- 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, &param);
+ GLfloat fparam[4];
+ fparam[0] = param;
+ fparam[1] = fparam[2] = fparam[3] = 0.0F;
+ _mesa_Fogfv(pname, fparam);
}