[evolution] EWeekView could write out of rows_per_day array



commit d3aafd7bf5694c37217fe41658e8240a6fc19349
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.

 src/calendar/gui/e-week-view.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/calendar/gui/e-week-view.h b/src/calendar/gui/e-week-view.h
index 18a5f8c..5e0a155 100644
--- a/src/calendar/gui/e-week-view.h
+++ b/src/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]