projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4071d06
)
mesa: Fix array out-of-bounds access by _mesa_TexParameterf.
author
Vinson Lee
<vlee@vmware.com>
Mon, 30 Nov 2009 02:17:44 +0000
(21:17 -0500)
committer
Vinson Lee
<vlee@vmware.com>
Sat, 5 Dec 2009 20:50:56 +0000
(12:50 -0800)
_mesa_TexParameterf calls set_tex_parameterf, which uses the params
argument as an array.
(cherry picked from commit
270d36da146b899d39e08f830fe34b63833a3731
)
src/mesa/main/texparam.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/texparam.c
b/src/mesa/main/texparam.c
index 416792f0e99f7453172ff8c8b60fdfea17ffb67e..4ce8c8593a9e73647b3c73a807975dadd5e98d10 100644
(file)
--- a/
src/mesa/main/texparam.c
+++ b/
src/mesa/main/texparam.c
@@
-551,8
+551,13
@@
_mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
}
break;
default:
- /* this will generate an error if pname is illegal */
- need_update = set_tex_parameterf(ctx, texObj, pname, ¶m);
+ {
+ /* this will generate an error if pname is illegal */
+ GLfloat p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0.0F;
+ need_update = set_tex_parameterf(ctx, texObj, pname, p);
+ }
}
if (ctx->Driver.TexParameter && need_update) {