From: Timo Sirainen Date: Tue, 20 Jun 2023 20:34:14 +0000 (+0300) Subject: dbox: Don't set dbox file corrupted twice X-Git-Tag: 2.4.0~2678 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8530d23a14a1425985875c439bc526eabcee05a7;p=thirdparty%2Fdovecot%2Fcore.git dbox: Don't set dbox file corrupted twice The file is set to be corrupted immediately when dbox file reading detects corruption, which causes the code path to return 0. This can happen all over the place. --- diff --git a/src/lib-storage/index/dbox-common/dbox-mail.c b/src/lib-storage/index/dbox-common/dbox-mail.c index 0e9696c302..088cfc6609 100644 --- a/src/lib-storage/index/dbox-common/dbox-mail.c +++ b/src/lib-storage/index/dbox-common/dbox-mail.c @@ -299,11 +299,6 @@ int dbox_mail_get_stream(struct mail *_mail, bool get_body ATTR_UNUSED, ret = get_mail_stream(mail, offset, &input); if (ret <= 0) { - if (ret < 0) - return -1; - dbox_file_set_corrupted(mail->open_file, - "uid=%u points to broken data at offset=" - "%"PRIuUOFF_T, _mail->uid, offset); i_stream_unref(&input); return -1; }