authorSergey Poznyakoff <>2020-03-31 18:34:49 (GMT)
committer Sergey Poznyakoff <>2020-03-31 18:34:49 (GMT)
commitb8664765e1c58e4443f86c57245d3d20dc31ce17 (patch) (side-by-side diff)
parent835b068ef5b8aa6b53632a33cdcffba2239c4531 (diff)
mbox: fix a bug in expunge routineHEADmaster
The bug will manifest itself by removal of the trailing newline in the last message in a block of unchanged messages when expunging the mailbox after removal of one or more messages before that block. Bug reported by Ken Olum. * libproto/mbox/mbox.c (mbox_expunge_unlocked): Fix an off-by-one error in computation of the file chunk size.
Diffstat (more/less context) (ignore whitespace changes)
1 files changed, 1 insertions, 1 deletions
diff --git a/libproto/mbox/mbox.c b/libproto/mbox/mbox.c
index 52e48f8..768e464 100644
--- a/libproto/mbox/mbox.c
+++ b/libproto/mbox/mbox.c
@@ -1269,7 +1269,7 @@ mbox_expunge_unlocked (mu_mailbox_t mailbox, size_t dirty, int remove_deleted,
return status;
status = mu_stream_copy (tempstr, mailbox->stream,
- mum->body_end - mum->envel_from, NULL);
+ mum->body_end - mum->envel_from + 1, NULL);
if (status)
mu_error (_("%s:%d: error copying: %s"),

Return to:

Send suggestions and report system problems to the System administrator.