[gnumeric] Fix crash on corrupted files. [#702689]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix crash on corrupted files. [#702689]
- Date: Thu, 20 Jun 2013 19:37:47 +0000 (UTC)
commit 7ce1453b44ad4e5392c6d4c628e4d785ecfe3745
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Thu Jun 20 13:36:29 2013 -0600
Fix crash on corrupted files. [#702689]
2013-06-20 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/wbc-gtk.c (show_gui): protect against excessively large
preferred widow sizes
ChangeLog | 5 +++++
NEWS | 1 +
src/wbc-gtk.c | 7 ++++---
3 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 99c7b20..dd3bdb8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-20 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * src/wbc-gtk.c (show_gui): protect against excessively large
+ preferred widow sizes
+
2013-06-14 Morten Welinder <terra gnome org>
* src/sheet-object-graph.c (dim_start): Don't crash on NULL desc.
diff --git a/NEWS b/NEWS
index f9b842f..7623f50 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,7 @@ Andreas:
* In ODF import ignored mentioned but not included sheets. [#698388]
* Fix crash on corrupted files. [#702205] [#702219] [#702285]
[#702288] [#702364] [#702409] [#702486] [#702485] [#702498] [#702322]
+ [#702689]
* Some documentation improvements. [Debian #621735] [Debian #530462]
* Fix crash on xlsx import due to external references. [#702407]
* Fix reading of conditional formats from xls files. [#702612]
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 052be7f..fe7abd4 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -2464,10 +2464,11 @@ show_gui (WBCGtk *wbcg)
int sx, sy;
gdouble fx, fy;
GdkRectangle rect;
+ GdkScreen *screen = wbcg_get_screen (wbcg);
/* In a Xinerama setup, we want the geometry of the actual display
* unit, if available. See bug 59902. */
- gdk_screen_get_monitor_geometry (wbcg_get_screen (wbcg), 0, &rect);
+ gdk_screen_get_monitor_geometry (screen, 0, &rect);
sx = MAX (rect.width, 600);
sy = MAX (rect.height, 200);
@@ -2484,8 +2485,8 @@ show_gui (WBCGtk *wbcg)
wbv != NULL &&
(wbv->preferred_width > 0 || wbv->preferred_height > 0)) {
/* Set grid size to preferred width */
- int pwidth = wbv->preferred_width;
- int pheight = wbv->preferred_height;
+ int pwidth = MIN(wbv->preferred_width, gdk_screen_get_width (screen));
+ int pheight = MIN(wbv->preferred_height, gdk_screen_get_height (screen));
GtkRequisition requisition;
pwidth = pwidth > 0 ? pwidth : -1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]