Bug 765179 - 1/2 - Check for empty GLSL identifier strings - r=jgilbert

This commit is contained in:
Benoit Jacob 2012-06-15 17:39:21 -04:00
parent ef8f0631cb
commit ca107b35b9

View File

@ -311,6 +311,9 @@ bool WebGLContext::ValidateDrawModeEnum(WebGLenum mode, const char *info)
bool WebGLContext::ValidateGLSLVariableName(const nsAString& name, const char *info)
{
if (name.IsEmpty())
return false;
const uint32_t maxSize = 256;
if (name.Length() > maxSize) {
ErrorInvalidValue("%s: identifier is %d characters long, exceeds the maximum allowed length of %d characters",