diff options
author | Not Zed <NotZed@Ximian.com> | 2004-05-13 17:37:40 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-05-13 17:37:40 +0800 |
commit | 5a89dabc7cfff27beb866f4e10768f21629bbba4 (patch) | |
tree | cde0d3cc056c6d6daba87b4957ee534f3b1e9209 | |
parent | e7c808ae155ad50c9fd7c876c744054ab2be2a15 (diff) | |
download | gsoc2013-evolution-5a89dabc7cfff27beb866f4e10768f21629bbba4.tar.gz gsoc2013-evolution-5a89dabc7cfff27beb866f4e10768f21629bbba4.tar.zst gsoc2013-evolution-5a89dabc7cfff27beb866f4e10768f21629bbba4.zip |
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
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/e-week-view-event-item.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 96b56aac6c..5b47fe211d 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -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 diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index 0bc43e12ef..22f33ebe43 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -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); |