Index: third_party/WebKit/Source/modules/webgl/WebGLTexture.cpp |
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLTexture.cpp b/third_party/WebKit/Source/modules/webgl/WebGLTexture.cpp |
index 80d5bd122550a8930eb8e6535f6b55be582539e1..59634f0cd614176114d6753e75c3cd62e2589710 100644 |
--- a/third_party/WebKit/Source/modules/webgl/WebGLTexture.cpp |
+++ b/third_party/WebKit/Source/modules/webgl/WebGLTexture.cpp |
@@ -173,6 +173,10 @@ void WebGLTexture::setLevelInfo(GLenum target, GLint level, GLenum internalForma |
int index = mapTargetToIndex(target); |
if (index < 0) |
return; |
+ |
+ if (level < 0 || level >= static_cast<GLint>(m_info[index].size())) |
+ return; |
qiankun
2015/11/23 06:19:00
See the above comments. level should be validated
|
+ |
m_info[index][level].setInfo(internalFormat, width, height, depth, type); |
update(); |
} |