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

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

Issue 2046223003: Prevent Null input in texSubImage2D(3D) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months 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/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index fb622a1592c3a19a6608e8f9d254a72977d142b9..ed5d71cc8f771575aa13eedd8ecb6bdf03eed89f 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -4123,7 +4123,8 @@ void WebGLRenderingContextBase::texImageHelperDOMArrayBufferView(TexImageFunctio
sourceType = Tex2D;
else
sourceType = Tex3D;
- if (!validateTexFuncData(funcName, sourceType, level, width, height, depth, format, type, pixels, NullAllowed))
+ if ((functionType == TexImage && !validateTexFuncData(funcName, sourceType, level, width, height, depth, format, type, pixels, NullAllowed))
+ || (functionType == TexSubImage && !validateTexFuncData(funcName, sourceType, level, width, height, depth, format, type, pixels, NullNotAllowed)))
Ken Russell (switch to Gerrit) 2016/06/08 21:13:07 It would be better to add a "switch" statement her
xidachen 2016/06/09 01:12:08 Done.
return;
void* data = pixels ? pixels->baseAddress() : 0;
Vector<uint8_t> tempData;
« 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