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

Unified Diff: chrome/browser/renderer_host/backing_store_x.cc

Issue 2904010: Fix acquisition of thumbnail images in Linux (Closed) Base URL: git@github.com:litl/big-chromium.git
Patch Set: Added my name to AUTHORS Created 10 years, 5 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/backing_store_x.cc
diff --git a/chrome/browser/renderer_host/backing_store_x.cc b/chrome/browser/renderer_host/backing_store_x.cc
index b7f5408a7e63f881b81e6c171492b24e6a9cf4fc..5a11ba0a12dde9966b9c6a911ff5836134fcfa46 100644
--- a/chrome/browser/renderer_host/backing_store_x.cc
+++ b/chrome/browser/renderer_host/backing_store_x.cc
@@ -326,8 +326,8 @@ bool BackingStoreX::CopyFromBackingStore(const gfx::Rect& rect,
}
// Create the shared memory segment for the image and map it.
if (image->bytes_per_line == 0 || image->height == 0 ||
- (std::numeric_limits<size_t>::max() / image->bytes_per_line) >
- static_cast<size_t>(image->height)) {
+ static_cast<size_t>(image->height) >
+ (std::numeric_limits<size_t>::max() / image->bytes_per_line)) {
XDestroyImage(image);
return false;
}
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698