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".
| Name |
Last commit
|
Last update |
|---|---|---|
| Install | Loading commit data... | |
| OGLCompilersDLL | Loading commit data... | |
| SPIRV | Loading commit data... | |
| StandAlone | Loading commit data... | |
| Test | Loading commit data... | |
| glslang | Loading commit data... | |
| tools | Loading commit data... | |
| .gitattributes | Loading commit data... | |
| .gitignore | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| ChooseMSVCCRT.cmake | Loading commit data... | |
| LinuxDoAll.bash | Loading commit data... | |
| README-spirv-remap.txt | Loading commit data... | |
| README.md | Loading commit data... | |
| SetupLinux.sh | Loading commit data... | |
| StandAlone.sln | Loading commit data... | |
| StandAlone.vcxproj | Loading commit data... | |
| StandAlone.vcxproj.filters | Loading commit data... | |
| StandAlone_vs2010.sln | Loading commit data... | |
| StandAlone_vs2010.vcxproj | Loading commit data... | |
| StandAlone_vs2013.sln | Loading commit data... | |
| StandAlone_vs2013.vcxproj | Loading commit data... | |
| Todo.txt | Loading commit data... | |
| glslang.vcxproj | Loading commit data... | |
| glslang.vcxproj.filters | Loading commit data... | |
| glslang_vs2010.vcxproj | Loading commit data... | |
| glslang_vs2013.vcxproj | Loading commit data... | |
| index.php | Loading commit data... |