[evolution/gnome-3-22] EWeekView could write out of rows_per_day array



commit ecbbaad720c960bc6ea784aea8218db26477eff2
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jan 5 10:42:11 2017 +0100

    EWeekView could write out of rows_per_day array
    
    Found by ASan. It only overwrote the next member of the structure,
    but still a bad thing to do.

 calendar/gui/e-week-view.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h
index 18a5f8c..5e0a155 100644
--- a/calendar/gui/e-week-view.h
+++ b/calendar/gui/e-week-view.h
@@ -217,7 +217,7 @@ struct _EWeekView {
        gint rows_per_compressed_cell;
 
        /* The number of rows we have used for each day (i.e. each cell) */
-       gint rows_per_day[E_WEEK_VIEW_MAX_WEEKS * 7];
+       gint rows_per_day[E_WEEK_VIEW_MAX_WEEKS * 7 + 1];
 
        /* If the small font is used for displaying the minutes. */
        gboolean use_small_font;


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