glslang-zig/glslang/MachineIndependent
Lei Zhang 6c9a38161b Protect location setting methods from writing to non-existing strings.
TInputScanner advances its internal indices to the next character at
the end of get(), which means, after reading in the last character
in the user-provided shader string, internal index (currentSource)
will point to the next shader string (currentSource == numSources),
which doesn't exist. Then if a location setting method is called,
we will write to some out-of-bound memory.

A test case for this is "#line 10000\n". The eval() method in CPPline()
will evaluate 10000, but at the same time it reads in the next
token, '\n', and the currentSource will be numSources in TInputScanner.
Then a parseContext.setCurrentLine() is called, we are writing to
out-of-bound memory. Another test case will be "#line 10000 0\n".
2015-07-15 13:03:27 -04:00
..
preprocessor Merge pull request #16 from google/pp-directive 2015-07-14 19:36:29 -06:00
Constant.cpp glslang portability: Fixed a slew of OSX compilation warnings (but not all). 2015-06-10 23:23:12 +00:00
gl_types.h Second round line ending clean up, from fresh round trip. 2015-06-26 16:42:50 -06:00
glslang.y Front-end: move to rational internal array-of-array interfaces and design. (A-of-A is not yet implemented though.) 2015-07-06 21:00:03 -06:00
InfoSink.cpp Fix the few non-portable uses of "char" (where a -1 might be relevant): All uses of char are now either "int", "unsigned char" or char arrays for storing strings. Also, went to consistent "char* foo" coding convention. (There were only a few ambiguous uses.) 2014-02-18 23:37:57 +00:00
Initialize.cpp Fix most clang warnings 2015-07-11 14:45:57 +02:00
Initialize.h Add texture gather functions (and extension check) for GLSL 400 and GL_ARB_texture_gather. 2013-10-21 19:25:59 +00:00
Intermediate.cpp glslang: Fix over 100 warnings from MSVC warning level 4. 2015-05-15 17:30:55 +00:00
intermOut.cpp Requesting input on Bug 1346: checking in, turned off, enum-based operators for texturing and image operations. Please reply there with any input, thanks. 2015-05-26 01:36:50 +00:00
IntermTraverse.cpp glslang: Fix over 100 warnings from MSVC warning level 4. 2015-05-15 17:30:55 +00:00
limits.cpp Second round line ending clean up, from fresh round trip. 2015-06-26 16:42:50 -06:00
linkValidate.cpp Second round line ending clean up, from fresh round trip. 2015-06-26 16:42:50 -06:00
localintermediate.h glslang: Fix over 100 warnings from MSVC warning level 4. 2015-05-15 17:30:55 +00:00
Makefile Check in a much improved submitted set of makefiles for Linux builds. This eliminates dependencies on system headers, and generally simplifies the makefiles. 2014-02-19 01:00:58 +00:00
parseConst.cpp glslang: Fix over 100 warnings from MSVC warning level 4. 2015-05-15 17:30:55 +00:00
ParseHelper.cpp Merge pull request #16 from google/pp-directive 2015-07-14 19:36:29 -06:00
ParseHelper.h Merge pull request #16 from google/pp-directive 2015-07-14 19:36:29 -06:00
PoolAlloc.cpp glslang: Fix over 100 warnings from MSVC warning level 4. 2015-05-15 17:30:55 +00:00
reflection.cpp Add .gitattributes and normalize a few stray file's line endings 2015-06-26 16:29:10 -06:00
reflection.h Second round line ending clean up, from fresh round trip. 2015-06-26 16:42:50 -06:00
RemoveTree.cpp Improvement to the AST traversal infrastructure. 2014-01-11 19:29:55 +00:00
RemoveTree.h Put all glslang internals (but not the external interface) into the glslang namespace. 2013-08-29 00:39:25 +00:00
Scan.cpp Simplify function calls for extensionsTurnedOn(). 2015-07-14 11:26:52 -04:00
Scan.h Protect location setting methods from writing to non-existing strings. 2015-07-15 13:03:27 -04:00
ScanContext.h glslang: Fix over 100 warnings from MSVC warning level 4. 2015-05-15 17:30:55 +00:00
ShaderLang.cpp Merge pull request #16 from google/pp-directive 2015-07-14 19:36:29 -06:00
SymbolTable.cpp Front-end: move to rational internal array-of-array interfaces and design. (A-of-A is not yet implemented though.) 2015-07-06 21:00:03 -06:00
SymbolTable.h glslang: Formally track all built-in variables, right from the beginning, to enable avoiding all textual compares at any subsequent stage in the stack. (To be used in future check ins.) 2015-05-18 16:45:49 +00:00
unistd.h Create a base GLSL front-end from the 3Dlabs glslang front-end from 20-Sep-2005. 2012-12-12 21:15:54 +00:00
Versions.cpp Simplify function calls for extensionsTurnedOn(). 2015-07-14 11:26:52 -04:00
Versions.h Use E_ prefix instead of _ for distinguishing extension strings from glext.h 2015-07-03 09:24:46 -06:00