projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcb4a37
)
glsl: Fix array out-of-bounds access by _slang_lookup_constant.
author
Vinson Lee
<vlee@vmware.com>
Thu, 10 Dec 2009 20:37:10 +0000
(12:37 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Thu, 10 Dec 2009 20:37:10 +0000
(12:37 -0800)
src/mesa/shader/slang/slang_simplify.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/slang/slang_simplify.c
b/src/mesa/shader/slang/slang_simplify.c
index b8a21f642cb1375cf5938c26bb51e45e534e33b4..539c6ff0d148e55655817036aaa325e2a34bb7b7 100644
(file)
--- a/
src/mesa/shader/slang/slang_simplify.c
+++ b/
src/mesa/shader/slang/slang_simplify.c
@@
-84,10
+84,11
@@
_slang_lookup_constant(const char *name)
for (i = 0; info[i].Name; i++) {
if (strcmp(info[i].Name, name) == 0) {
/* found */
- GLint value = -1;
- _mesa_GetIntegerv(info[i].Token, &value);
- ASSERT(value >= 0); /* sanity check that glGetFloatv worked */
- return value;
+ GLint values[4];
+ values[0] = -1;
+ _mesa_GetIntegerv(info[i].Token, values);
+ ASSERT(values[0] >= 0); /* sanity check that glGetFloatv worked */
+ return values[0];
}
}
return -1;