Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caldav_alarm:get_floatingtz() do not try to parse missing calendar-timezone as timezone #4627

Conversation

dilyanpalauzov
Copy link
Contributor

In (cyrus-imapd-3.6) imap/caldav_alarm.c:get_floatingtz()

static icaltimezone *get_floatingtz(const char *mailbox, const char *userid)
{
    icaltimezone *floatingtz = NULL;

    struct buf buf = BUF_INITIALIZER;
    const char *annotname = DAV_ANNOT_NS "<" XML_NS_CALDAV ">calendar-timezone";
    if (!annotatemore_lookupmask(mailbox, annotname, userid, &buf)) {
        icalcomponent *comp = NULL;
        comp = icalparser_parse_string(buf_cstring(&buf));

can call icalparser_parse_string("") which produces during dav_reconstruct -a many such warnings:

Reconstructing DAV DB for [email protected]...
../src/libical/icalerror.c:116: BADARG: Bad argument to function
/usr/local/lib/../lib64/libical.so.3(ical_bt+0x21) [0x7f1797e55711]
/usr/local/lib/../lib64/libical.so.3(icalcomponent_get_first_component+0x7f) [0x7f1797e59cef]
/usr/local/lib/libcyrus_imap.so.0(+0xc8f72) [0x7f179b016f72]
/usr/local/lib/libcyrus_imap.so.0(+0xcaa74) [0x7f179b018a74]
/usr/local/lib/libcyrus_imap.so.0(caldav_alarm_process+0x32e) [0x7f179b01986e]
/usr/local/lib/libcyrus_imap.so.0(dav_reconstruct_user+0x1f9) [0x7f179afa0869]
/usr/local/lib/libcyrus_imap.so.0(+0x84a11) [0x7f179afd2a11]
/usr/local/lib/libcyrus.so.0(+0x928d8) [0x7f179ac5b8d8]
/usr/local/lib/libcyrus_imap.so.0(mboxlist_allmbox+0xf2) [0x7f179afd83e2]
/usr/local/lib/libcyrus_imap.so.0(mboxlist_alluser+0x45) [0x7f179afd84f5]
dav_reconstruct() [0x4012db]
/lib64/libc.so.6(+0x23677) [0x7f17979fd677]
/lib64/libc.so.6(__libc_start_main+0x85) [0x7f17979fd735]
dav_reconstruct() [0x401301]
../src/libical/icalerror.c:116: BADARG: Bad argument to function
/usr/local/lib/../lib64/libical.so.3(ical_bt+0x21) [0x7f1797e55711]
/usr/local/lib/libcyrus_imap.so.0(+0xc8fa3) [0x7f179b016fa3]
/usr/local/lib/libcyrus_imap.so.0(+0xcaa74) [0x7f179b018a74]
/usr/local/lib/libcyrus_imap.so.0(caldav_alarm_process+0x32e) [0x7f179b01986e]
/usr/local/lib/libcyrus_imap.so.0(dav_reconstruct_user+0x1f9) [0x7f179afa0869]
/usr/local/lib/libcyrus_imap.so.0(+0x84a11) [0x7f179afd2a11]
/usr/local/lib/libcyrus.so.0(+0x928d8) [0x7f179ac5b8d8]
/usr/local/lib/libcyrus_imap.so.0(mboxlist_allmbox+0xf2) [0x7f179afd83e2]
/usr/local/lib/libcyrus_imap.so.0(mboxlist_alluser+0x45) [0x7f179afd84f5]
dav_reconstruct() [0x4012db]
/lib64/libc.so.6(+0x23677) [0x7f17979fd677]
/lib64/libc.so.6(__libc_start_main+0x85) [0x7f17979fd735]
dav_reconstruct() [0x401301]

This change is likely relevant for cyrus-imapd-3.8 and irrelevant for master.

@ksmurchison ksmurchison added 3.6 affects 3.6 3.8 affects 3.8 labels Jan 9, 2024
dilyanpalauzov added a commit to dilyanpalauzov/cyrus-imapd that referenced this pull request Sep 24, 2024
@rsto rsto self-assigned this Oct 14, 2024
@rsto
Copy link
Member

rsto commented Oct 15, 2024

@elliefm This could be backported to 3.6 and 3.8, it's not relevant for 3.10 and later. OK for me to merge into cyrus-imapd-3.6 and cyrus-imapd-3.8? I don't want to interfere with whatever process you have for this.

@elliefm elliefm assigned elliefm and unassigned rsto Oct 25, 2024
@elliefm
Copy link
Contributor

elliefm commented Oct 25, 2024

Made the equivalent change directly on the 3.6 and 3.8 branches as 7a06241 and 084edfd respectively

@elliefm elliefm closed this Oct 25, 2024
@elliefm elliefm removed their assignment Oct 25, 2024
@dilyanpalauzov dilyanpalauzov deleted the 36_caldav_alarm_get_floatingtz branch October 25, 2024 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.6 affects 3.6 3.8 affects 3.8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants