Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLTexture.cpp

Issue 1468883002: Fix the crash of compressedTexImage3D for the WebGL2 conformance test page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698