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

Unified Diff: cc/layers/texture_layer_impl.cc

Issue 220093002: cc: Prevent integer overflow with software TextureMailbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | cc/resources/texture_mailbox.h » ('j') | cc/resources/texture_mailbox.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/texture_layer_impl.cc
diff --git a/cc/layers/texture_layer_impl.cc b/cc/layers/texture_layer_impl.cc
index a2bd770fe8a6178796701efa3656b31b089e7167..4ce501b2d7f59a46242fafa879a292cee85413f3 100644
--- a/cc/layers/texture_layer_impl.cc
+++ b/cc/layers/texture_layer_impl.cc
@@ -124,8 +124,8 @@ bool TextureLayerImpl::WillDraw(DrawMode draw_mode,
if (!PlatformColor::SameComponentOrder(texture_copy_->format())) {
// Swizzle colors. This is slow, but should be really uncommon.
- swizzled.resize(texture_mailbox_.shared_memory_size_in_bytes());
- for (size_t i = 0; i < texture_mailbox_.shared_memory_size_in_bytes();
+ swizzled.resize(texture_mailbox_.SharedMemorySizeInBytes());
+ for (size_t i = 0; i < texture_mailbox_.SharedMemorySizeInBytes();
i += 4) {
swizzled[i] = pixels[i + 2];
swizzled[i + 1] = pixels[i + 1];
« no previous file with comments | « no previous file | cc/resources/texture_mailbox.h » ('j') | cc/resources/texture_mailbox.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698