From: Timo Sirainen Date: Sat, 25 Oct 2008 13:32:53 +0000 (+0300) Subject: Fixed "no extension shrinking" code to work correctly. X-Git-Tag: 1.2.alpha4~157 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23e3e6604959447b81ff9df325018c9ec56a8189;p=thirdparty%2Fdovecot%2Fcore.git Fixed "no extension shrinking" code to work correctly. --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-index-sync-ext.c b/src/lib-index/mail-index-sync-ext.c index 81f5336064..66f36f0599 100644 --- a/src/lib-index/mail-index-sync-ext.c +++ b/src/lib-index/mail-index-sync-ext.c @@ -276,8 +276,9 @@ sync_ext_resize(const struct mail_transaction_ext_intro *u, if (new_size < old_size) { /* header shrank */ - if (!no_shrink) { + if (no_shrink) new_size = old_size; + else { buffer_delete(map->hdr_copy_buf, ext->hdr_offset + new_size, old_size - new_size);