From 36623c8339256d706187f694ee45a73e3997daae Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 2 Nov 2022 09:01:11 +0100 Subject: [PATCH] gcal-recurrence: Handle invalid 'until' time When the until's time part is invalid, the libical claims the time as valid, but the conversion into the GDateTime fails and returns NULL. Such events, which claim to have until-date recurrence, but NULL 'until' cannot be edited, because they cause a crash of the application. More information can be found downstream at: https://bugzilla.redhat.com/show_bug.cgi?id=2135772 Related to https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/892 --- src/core/gcal-recurrence.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/gcal-recurrence.c b/src/core/gcal-recurrence.c index 91a152c5..3d271036 100644 --- a/src/core/gcal-recurrence.c +++ b/src/core/gcal-recurrence.c @@ -229,6 +229,8 @@ gcal_recurrence_parse_recurrence_rules (ECalComponent *comp) { recur->limit_type = GCAL_RECURRENCE_UNTIL; recur->limit.until = gcal_date_time_from_icaltime (until); + if (!recur->limit.until) + recur->limit_type = GCAL_RECURRENCE_FOREVER; } else { -- GitLab