summaryrefslogtreecommitdiff
path: root/gtk/gtkcalendar.c
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2008-06-18 15:42:27 +0000
committerMichael Natterer <mitch@src.gnome.org>2008-06-18 15:42:27 +0000
commit09e8017c91305543a9380737a72a060704623892 (patch)
treea26fa783caf9f446058ae0189afa0193c296f5eb /gtk/gtkcalendar.c
parent419260bdb85b30e100187e7c268c12e648f9e698 (diff)
downloadgtk+-09e8017c91305543a9380737a72a060704623892.tar.gz
set the maximum of the "year" property to G_MAXINT >> 8 instead of
2008-06-18 Michael Natterer <mitch@imendio.com> * gtk/gtkcalendar.c: set the maximum of the "year" property to G_MAXINT >> 8 instead of G_MAXINT to fix overflows in internal calculations which in turn caused writing beyond the boundaries of the calendar->day_month[] and day[] arrays which in turn caused a SEGV. This limits the lifetime of GTK+ to the year 8,388,608 ;) svn path=/trunk/; revision=20452
Diffstat (limited to 'gtk/gtkcalendar.c')
-rw-r--r--gtk/gtkcalendar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 9db1726fb9..43416c2e02 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -441,7 +441,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
g_param_spec_int ("year",
P_("Year"),
P_("The selected year"),
- 0, G_MAXINT, 0,
+ 0, G_MAXINT >> 8, 0,
GTK_PARAM_READWRITE));
/**