projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fccebf
)
glsl: check for leading zeros in array index validation
author
Timothy Arceri
<t_arceri@yahoo.com.au>
Thu, 2 Jul 2015 22:45:30 +0000
(08:45 +1000)
committer
Timothy Arceri
<t_arceri@yahoo.com.au>
Wed, 22 Jul 2015 02:58:33 +0000
(12:58 +1000)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/glsl/linker.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/linker.cpp
b/src/glsl/linker.cpp
index
28ad2f3
..
58dd9fb
100644
(file)
--- a/
src/glsl/linker.cpp
+++ b/
src/glsl/linker.cpp
@@
-462,6
+462,10
@@
parse_program_resource_name(const GLchar *name,
if (array_index < 0)
return -1;
+ /* Check for leading zero */
+ if (name[i] == '0' && name[i+1] != ']')
+ return -1;
+
*out_base_name_end = name + (i - 1);
return array_index;
}