]> Pileus Git - ~andy/gtk/commitdiff
Bug 541600 – GtkCalendar segfault for certain values of detail-with-chars
authorMathias Hasselmann <hasselmm@src.gnome.org>
Mon, 18 Aug 2008 22:20:19 +0000 (22:20 +0000)
committerMathias Hasselmann <hasselmm@src.gnome.org>
Mon, 18 Aug 2008 22:20:19 +0000 (22:20 +0000)
* gtk/gtkcalendar.c (gtk_calendar_class_init()): Limit the "year"
  property to G_MAXINT >> 9, instead of G_MAXINT >> 8: year_to_days()
  multiplies the year property with 365 and returns the result as
  glong. Therefore ceil(log(365, 2)) = 9 bits must be available,
  not just 8 bits.

svn path=/trunk/; revision=21150

ChangeLog
gtk/gtkcalendar.c

index eb1967da286ceb049221ca572598431bc30206a0..8bf50c2f3f49e0488d419efac09ff15925610ee9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-08-19  Mathias Hasselmann  <mathias@openismus.com>
+
+       Bug 541600 – GtkCalendar segfault for certain values of detail-with-chars
+
+       * gtk/gtkcalendar.c (gtk_calendar_class_init()): Limit the "year"
+         property to G_MAXINT >> 9, instead of G_MAXINT >> 8: year_to_days()
+         multiplies the year property with 365 and returns the result as
+         glong. Therefore ceil(log(365, 2)) = 9 bits must be available,
+         not just 8 bits.
+
 2008-08-18  Björn Lindqvist  <bjourne@gmail.com>
 
        Bug 541315 – Segfault when selecting a GtkMenuItem with submenu
index 31b14c91d4ff021a70af38851e9b51da436e432c..964b4bcbbd363a4b3923416ef7cdb369b81fa1c7 100644 (file)
@@ -439,7 +439,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
                                    g_param_spec_int ("year",
                                                     P_("Year"),
                                                     P_("The selected year"),
-                                                    0, G_MAXINT >> 8, 0,
+                                                    0, G_MAXINT >> 9, 0,
                                                     GTK_PARAM_READWRITE));
 
   /**