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

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

Issue 2528243002: Fix silent truncations when extracting values from CheckedNumeric (Closed)
Patch Set: compile cleanup and fix Created 4 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
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 95af46d616493bafc19152481b5640fa7c76684a..060b757854ff2481647a844fddf7ae1ff37e2606 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -4101,8 +4101,8 @@ void WebGLRenderingContextBase::readPixelsHelper(GLint x,
}
if (!validateReadPixelsFuncParameters(
width, height, format, type, pixels,
- static_cast<long long>(pixels->byteLength() -
- offsetInBytes.ValueOrDie()))) {
+ static_cast<long long>(
+ (pixels->byteLength() - offsetInBytes).ValueOrDie()))) {
return;
}
clearIfComposited();

Powered by Google App Engine
This is Rietveld 408576698