mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-14 01:38:51 +00:00
Fix OOM when having a lot of recurrence rules
We had a broken client that created calendar entries with a lot of recurrence rule (all of them FREQ=WEEKLY) and a lot of alarms. This led to SOGo going out of memory. This patch works around that by filtering out duplicated rules as they yield the same date ranges and we only need to have them once.
This commit is contained in:
@@ -1358,7 +1358,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
rules = [component recurrenceRulesWithTimeZone: tz];
|
||||
exRules = [component exceptionRulesWithTimeZone: tz];
|
||||
}
|
||||
|
||||
|
||||
rules = [rules uniqueObjects];
|
||||
|
||||
// Calculate the occurrences for the given range
|
||||
records = [NSMutableArray array];
|
||||
ranges =
|
||||
|
||||
Reference in New Issue
Block a user