mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 775234 - WebGL: fix 1-byte out-of-bounds access in compileShader - r=jgilbert
This commit is contained in:
parent
a740ec36a9
commit
d06cfc9f52
@ -5022,9 +5022,13 @@ WebGLContext::CompileShader(WebGLShader *shader)
|
||||
// we always query uniform info, regardless of useShaderSourceTranslation,
|
||||
// as we need it to validate uniform setter calls, and it doesn't rely on
|
||||
// shader translation.
|
||||
char mappedNameLength = strlen(mapped_name);
|
||||
char mappedNameLastChar = mappedNameLength > 1
|
||||
? mapped_name[mappedNameLength - 1]
|
||||
: 0;
|
||||
shader->mUniformInfos.AppendElement(WebGLUniformInfo(
|
||||
size,
|
||||
length > 1 && mapped_name[length - 1] == ']',
|
||||
mappedNameLastChar == ']',
|
||||
type));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user