[dovecot/core] 9753fd: lib-mail: Add asserts to message_part_*() to make ...

GitHub noreply at github.com
Wed Jul 25 18:30:06 EEST 2018


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 9753fd9410a2aaf7a0814eeeba2f67af7d782559
      https://github.com/dovecot/core/commit/9753fd9410a2aaf7a0814eeeba2f67af7d782559
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-07-25 (Wed, 25 Jul 2018)

  Changed paths:
    M src/lib-mail/message-part-data.c

  Log Message:
  -----------
  lib-mail: Add asserts to message_part_*() to make sure part->data isn't NULL

This makes it easier to debug the crashes than just having a segfault.


  Commit: a14b731f3c87df76a0b5112a19e9b36162491049
      https://github.com/dovecot/core/commit/a14b731f3c87df76a0b5112a19e9b36162491049
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-07-25 (Wed, 25 Jul 2018)

  Changed paths:
    M src/lib-storage/index/index-mail-headers.c
    M src/lib-storage/index/index-mail.c
    M src/lib-storage/index/index-mail.h

  Log Message:
  -----------
  lib-storage: Fix bodystructure parsing crash if header is parsed twice

The second parsing will recreate the parser_ctx, discarding the old parsed
message_part.data for the header. On the second parsing
save_bodystructure_header=FALSE so the message_part.data isn't filled for
the header. Later on the bodystructure parsing assumes the data is set,
and crashes.

This only happened with mail_attachment_detection_options=add-flags-on-save
and Sieve script that first accessed a non-cached header and then used the
"body" extension.

Fixes segfault and also:
Panic: file imap-bodystructure.c: line 116 (part_write_body_multipart): assertion failed: (part->data != NULL)


Compare: https://github.com/dovecot/core/compare/5803ae4bbd42...a14b731f3c87
      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the dovecot-cvs mailing list