Mesa (master): mesa: Fix potential out-of-bounds access by _vbo_Materialf.
Vinson Lee
vlee at kemper.freedesktop.org
Thu Jul 15 07:56:24 UTC 2010
Module: Mesa
Branch: master
Commit: cc2f337d06987ea7a8fbf30ce33330b4d993207c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cc2f337d06987ea7a8fbf30ce33330b4d993207c
Author: Vinson Lee <vlee at vmware.com>
Date: Thu Jul 15 00:53:07 2010 -0700
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 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 365419d..9df75a8 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);
}
More information about the mesa-commit
mailing list