Bug 754669 - fix stack corruption in WebGL texImage2D parameter validation - r=jrmuizel - landing on a CLOSED TREE because this stack corruption started causing mochitest-1 crashes

This commit is contained in:
Benoit Jacob 2012-05-23 18:05:48 -04:00
parent 375277f4b6
commit 9d4c82bd03

View File

@ -427,17 +427,17 @@ bool WebGLContext::ValidateLevelWidthHeightForTarget(WebGLenum target, WebGLint
}
if (!(maxTextureSize >> level)) {
ErrorInvalidValue("%s: 2^level exceeds maximum texture size");
ErrorInvalidValue("%s: 2^level exceeds maximum texture size", info);
return false;
}
if (width < 0 || height < 0) {
ErrorInvalidValue("%s: width and height must be >= 0");
ErrorInvalidValue("%s: width and height must be >= 0", info);
return false;
}
if (width > maxTextureSize || height > maxTextureSize) {
ErrorInvalidValue("%s: width or height exceeds maximum texture size");
ErrorInvalidValue("%s: width or height exceeds maximum texture size", info);
return false;
}