Mesa (mesa_7_6_branch): mesa: Fix array out-of-bounds access by _mesa_TexGeni.

Vinson Lee vlee at kemper.freedesktop.org
Sat Dec 5 13:00:17 PST 2009


Module: Mesa
Branch: mesa_7_6_branch
Commit: d74cd04e6190ebb3a9c53d45cbb2452d92e24ad5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d74cd04e6190ebb3a9c53d45cbb2452d92e24ad5

Author: Vinson Lee <vlee at vmware.com>
Date:   Sat Nov 28 23:47:23 2009 -0500

mesa: Fix array out-of-bounds access by _mesa_TexGeni.

_mesa_TexGeni calls _mesa_TexGeniv, which uses the params argument
as an array.
(cherry picked from commit d55fb7c835b56951f05a058083e7eda264ba192e)

---

 src/mesa/main/texgen.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c
index e3feb02..13b3374 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -213,7 +213,10 @@ _mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param )
 void GLAPIENTRY
 _mesa_TexGeni( GLenum coord, GLenum pname, GLint param )
 {
-   _mesa_TexGeniv( coord, pname, &param );
+   GLint p[4];
+   p[0] = param;
+   p[1] = p[2] = p[3] = 0;
+   _mesa_TexGeniv( coord, pname, p );
 }
 
 



More information about the mesa-commit mailing list