projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c9e54f
)
mesa: Fix potential out-of-bounds access by _vbo_Materialf.
author
Vinson Lee
<vlee@vmware.com>
Thu, 15 Jul 2010 07:53:07 +0000
(
00:53
-0700)
committer
Vinson Lee
<vlee@vmware.com>
Thu, 15 Jul 2010 07:53:07 +0000
(
00:53
-0700)
_vbo_Materialf calls _vbo_Materialfv, which uses the params argument as
an array.
src/mesa/vbo/vbo_exec_api.c
patch
|
blob
|
history
diff --git
a/src/mesa/vbo/vbo_exec_api.c
b/src/mesa/vbo/vbo_exec_api.c
index 365419d44fad7730567a42c29b3bc160cb844047..9df75a840657db6d23d30ddd6be0841613c50c10 100644
(file)
--- 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);
}