From cc2f337d06987ea7a8fbf30ce33330b4d993207c Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 15 Jul 2010 00:53:07 -0700 Subject: [PATCH] mesa: Fix potential out-of-bounds access by _vbo_Materialf. _vbo_Materialf calls _vbo_Materialfv, which uses the params argument as an array. --- src/mesa/vbo/vbo_exec_api.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } -- 2.30.2