Mercurial > dovecot > core-2.2
changeset 16857:73216464c8e1
imap: Don't assert-crash on FETCH BODY[MIME] (return BAD instead)
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 16 Oct 2013 20:16:45 +0300 |
parents | b9498573f0d0 |
children | 7bd65a83a9a3 |
files | src/lib-imap-storage/imap-msgpart.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-imap-storage/imap-msgpart.c Sat Oct 12 11:11:04 2013 +0300 +++ b/src/lib-imap-storage/imap-msgpart.c Wed Oct 16 20:16:45 2013 +0300 @@ -254,6 +254,8 @@ section = t_str_ucase(section); if (strcmp(section, "MIME") == 0) { + if (msgpart->section_number[0] == '\0') + return -1; msgpart->fetch_type = FETCH_MIME; msgpart->wanted_fields |= MAIL_FETCH_STREAM_BODY; } else if (strcmp(section, "TEXT") == 0) {