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

Unified Diff: chrome/browser/window_sizer_linux.cc

Issue 113884: Fix comparison in window_sizer_linux. There can be multiple desktops so data_... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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: chrome/browser/window_sizer_linux.cc
===================================================================
--- chrome/browser/window_sizer_linux.cc (revision 16967)
+++ chrome/browser/window_sizer_linux.cc (working copy)
@@ -58,6 +58,7 @@
// Get the available screen space as a gfx::Rect, or return false if
// if it's unavailable (i.e. the window manager doesn't support
// retrieving this).
+ // TODO(thestig) Use _NET_CURRENT_DESKTOP here as well?
bool GetScreenWorkArea(gfx::Rect* out_rect) const {
gboolean ok;
guchar* raw_data = NULL;
@@ -76,7 +77,7 @@
return false;
// We expect to get four longs back: x1, y1, x2, y2.
- if (data_len != 4 * sizeof(glong)) {
+ if (data_len < static_cast<gint>(4 * sizeof(glong))) {
NOTREACHED();
g_free(raw_data);
return false;
« 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