gtk+ r21150 - in trunk: . gtk



Author: hasselmm
Date: Mon Aug 18 22:20:19 2008
New Revision: 21150
URL: http://svn.gnome.org/viewvc/gtk+?rev=21150&view=rev

Log:
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.


Modified:
   trunk/ChangeLog
   trunk/gtk/gtkcalendar.c

Modified: trunk/gtk/gtkcalendar.c
==============================================================================
--- trunk/gtk/gtkcalendar.c	(original)
+++ trunk/gtk/gtkcalendar.c	Mon Aug 18 22:20:19 2008
@@ -439,7 +439,7 @@
                                    g_param_spec_int ("year",
 						     P_("Year"),
 						     P_("The selected year"),
-						     0, G_MAXINT >> 8, 0,
+						     0, G_MAXINT >> 9, 0,
 						     GTK_PARAM_READWRITE));
 
   /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]