]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Fix crash with Maildir when trying to send INPROGRESS during mailbox syncing
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sat, 15 Feb 2025 18:43:22 +0000 (20:43 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 17 Feb 2025 11:12:08 +0000 (11:12 +0000)
Mailbox syncing could have been done outside command context, in which case
there is no global event.

src/imap/imap-storage-callbacks.c

index 7cd31007ffc87f22e6271617d8d180b87e2bd844..ad741fb83cd47c9193a9ad6bff5c81502baa37f2 100644 (file)
@@ -44,7 +44,7 @@ static void notify_no(struct mailbox *mailbox ATTR_UNUSED,
 
 static const char *find_cmd_tag(struct event *event)
 {
-       const struct event_field *field =
+       const struct event_field *field = event == NULL ? NULL :
                event_find_field_recursive(event, "cmd_tag");
        return field != NULL && field->value_type == EVENT_FIELD_VALUE_TYPE_STR ?
               field->value.str : NULL;