[gnome-calendar/gnome-3-24] year-view: Uninitialised values



commit c66a3c19b63e7bc9f072911286bc3a483cdc2bae
Author: Isaque Galdino <igaldino gmail com>
Date:   Fri Apr 21 23:16:26 2017 -0300

    year-view: Uninitialised values
    
    Valgrind was reporting some "Conditional jump or move depends on
    uninitialised value(s)" and "Invalid read of size 4" when hovering
    year-view.
    
    It was found some uninitialised variables in the code and they were
    initialised before being used.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781430

 src/views/gcal-year-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/views/gcal-year-view.c b/src/views/gcal-year-view.c
index 46d17b9..72bd59a 100644
--- a/src/views/gcal-year-view.c
+++ b/src/views/gcal-year-view.c
@@ -816,6 +816,7 @@ draw_month_grid (GcalYearView *year_view,
   shown_rows = ceil (days / 7.0);
   sunday_idx = year_view->k * 7 + sw * ((7 - year_view->first_weekday) % 7) + year_view->show_week_numbers * 
(1 - year_view->k);
 
+  today = icaltime_today ();
   today.year = year_view->date->year;
   today.month = month_nr + 1;
   today.day = 1;
@@ -1205,7 +1206,7 @@ navigator_motion_notify_cb (GcalYearView   *year_view,
                             GdkEventMotion *event,
                             GtkWidget      *widget)
 {
-  gint day, month;
+  gint day = 0, month = 0;
   gboolean is_title = FALSE;
 
   /* Cancel the hover when selecting a date range */


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