From: Vinson Lee Date: Thu, 15 Jul 2010 07:53:07 +0000 (-0700) Subject: mesa: Fix potential out-of-bounds access by _vbo_Materialf. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc2f337d06987ea7a8fbf30ce33330b4d993207c;p=mesa.git mesa: Fix potential out-of-bounds access by _vbo_Materialf. _vbo_Materialf calls _vbo_Materialfv, which uses the params argument as an array. --- 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, ¶m); + GLfloat p[4]; + p[0] = param; + p[1] = p[2] = p[3] = 0.0F; + vbo_Materialfv(face, pname, p); }