aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-07-15 00:53:07 -0700
committerVinson Lee <[email protected]>2010-07-15 00:53:07 -0700
commitcc2f337d06987ea7a8fbf30ce33330b4d993207c (patch)
tree81fea5d3265573081ec0ee848547ff50a29a261f /src/mesa
parent5c9e54f2ff2eb651b5bf594ac95d39ba5747c500 (diff)
mesa: Fix potential out-of-bounds access by _vbo_Materialf.
_vbo_Materialf calls _vbo_Materialfv, which uses the params argument as an array.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/vbo/vbo_exec_api.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 365419d44fa..9df75a84065 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -969,7 +969,10 @@ _vbo_Materialfv(GLenum face, GLenum pname, const GLfloat *params)
void GLAPIENTRY
_vbo_Materialf(GLenum face, GLenum pname, GLfloat param)
{
- vbo_Materialfv(face, pname, &param);
+ GLfloat p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0.0F;
+ vbo_Materialfv(face, pname, p);
}