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 5976d2e454
commit 67f30a33e0

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",