In a matrix constructor that takes a number of components, as many
components as necessary must be taken, with the rest discarded, as GLSL
allows more components than necessary to be specified. For example, the
following:
mat4 m4 = mat4(v4, v4.yzwx, v4.zwx, v4.zwxy, v4.wxyz);
is equivalent to:
mat4 m4 = mat4(v4, v4.yzwx, v4.zwx, v4.zwxy, v4.w);
glslang takes the components from the constructor and builds the single
components of the matrix in a 2D array before constructing the matrix
itself. It however did not check for extra parameters and was thus
writing OOB to said 2D array. This is fixed in this change
Signed-off-by:
Shahbaz Youssefi <shabbyx@gmail.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| External | Loading commit data... | |
| OGLCompilersDLL | Loading commit data... | |
| SPIRV | Loading commit data... | |
| StandAlone | Loading commit data... | |
| Test | Loading commit data... | |
| build_overrides | Loading commit data... | |
| glslang | Loading commit data... | |
| gtests | Loading commit data... | |
| hlsl | Loading commit data... | |
| kokoro | Loading commit data... | |
| ndk_test | Loading commit data... | |
| .appveyor.yml | Loading commit data... | |
| .clang-format | Loading commit data... | |
| .gitattributes | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .gn | Loading commit data... | |
| .travis.yml | Loading commit data... | |
| Android.mk | Loading commit data... | |
| BUILD.bazel | Loading commit data... | |
| BUILD.gn | Loading commit data... | |
| CHANGES.md | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| CODE_OF_CONDUCT.md | Loading commit data... | |
| ChooseMSVCCRT.cmake | Loading commit data... | |
| DEPS | Loading commit data... | |
| LICENSE.txt | Loading commit data... | |
| README-spirv-remap.txt | Loading commit data... | |
| README.md | Loading commit data... | |
| WORKSPACE | Loading commit data... | |
| _config.yml | Loading commit data... | |
| build_info.h.tmpl | Loading commit data... | |
| build_info.py | Loading commit data... | |
| known_good.json | Loading commit data... | |
| known_good_khr.json | Loading commit data... | |
| license-checker.cfg | Loading commit data... | |
| parse_version.cmake | Loading commit data... | |
| standalone.gclient | Loading commit data... | |
| update_glslang_sources.py | Loading commit data... |