add some array bounds checking as an attempt to isolate the crash in

2004-05-13  Not Zed  <NotZed@Ximian.com>

        * gui/e-week-view-event-item.c (e_week_view_event_item_draw): add
        some array bounds checking as an attempt to isolate the crash in
        #57644.

svn path=/trunk/; revision=25896
This commit is contained in:
Not Zed
2004-05-13 09:37:40 +00:00
committed by Michael Zucci
parent e7c808ae15
commit 5a89dabc7c
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2004-05-13 Not Zed <NotZed@Ximian.com>
* gui/e-week-view-event-item.c (e_week_view_event_item_draw): add
some array bounds checking as an attempt to isolate the crash in
#57644.
2004-05-11 Not Zed <NotZed@Ximian.com>
* gui/migration.c (migrate_calendars, migrate_tasks): add GError

View File

@ -250,8 +250,13 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item,
if (wveitem->event_num == -1 || wveitem->span_num == -1)
return;
g_return_if_fail(wveitem->event_num < week_view->events->len);
event = &g_array_index (week_view->events, EWeekViewEvent,
wveitem->event_num);
g_return_if_fail(event->spans_index + wveitem->span_num < week_view->spans->len);
span = &g_array_index (week_view->spans, EWeekViewEventSpan,
event->spans_index + wveitem->span_num);