projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33a120e
)
mesa: fix baseLevel >= MAX_TEXTURE_LEVELS test
author
Brian Paul
<brianp@vmware.com>
Wed, 9 Dec 2009 15:30:01 +0000
(08:30 -0700)
committer
Brian Paul
<brianp@vmware.com>
Wed, 9 Dec 2009 15:30:05 +0000
(08:30 -0700)
This fixes invalid array indexing when baseLevel == MAX_TEXTURE_LEVELS.
See bug 25528.
src/mesa/main/texobj.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/texobj.c
b/src/mesa/main/texobj.c
index da55ac8697d02f5e4a0e4ae82d9cd98a92aa4a5d..85f5f78e5098ff357d10daad3c4eddee01f2f954 100644
(file)
--- a/
src/mesa/main/texobj.c
+++ b/
src/mesa/main/texobj.c
@@
-418,7
+418,7
@@
_mesa_test_texobj_completeness( const GLcontext *ctx,
/* Detect cases where the application set the base level to an invalid
* value.
*/
- if ((baseLevel < 0) || (baseLevel > MAX_TEXTURE_LEVELS)) {
+ if ((baseLevel < 0) || (baseLevel >
=
MAX_TEXTURE_LEVELS)) {
char s[100];
_mesa_sprintf(s, "base level = %d is invalid", baseLevel);
incomplete(t, s);