Commit 3847f94d by Geoff Lang

Validate that the mip level is not too large for CopyTextureCHROMIUM.

When the mip level was greater than the maximum, it could cause an out-of-bounds read when trying to query the Texture's size and format later in the validation. BUG=740426 Change-Id: Ibd6c977981e5f8b7368c161b7969d9e916c6095b
parent 1636e1b9
......@@ -342,7 +342,7 @@ bool IsValidCopyTextureSourceTarget(Context *context, GLenum target)
bool IsValidCopyTextureSourceLevel(Context *context, GLenum target, GLint level)
{
if (level < 0)
if (!ValidMipLevel(context, target, level))
{
return false;
}
......@@ -361,7 +361,7 @@ bool IsValidCopyTextureDestinationLevel(Context *context,
GLsizei width,
GLsizei height)
{
if (level < 0)
if (!ValidMipLevel(context, target, level))
{
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment