summaryrefslogtreecommitdiffstats
path: root/mutt.h
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-12-21 15:30:01 -0800
committerKevin McCarthy <kevin@8t8.us>2020-12-22 17:40:53 -0800
commit11b18027d3d710f30c78e1171ea8ee94f75f0ac1 (patch)
tree4b2c95420a029f2f01253855503d5c2e91497294 /mutt.h
parenta7b839e59c32f20daf2bd3737d70c851f5c9bf7d (diff)
Fix offset to use LOFF_T in a couple places.
The BODY->hdr_offset was incorrectly of type long, which could result in corrupted >2gb mbox files in some circumstances. The uses in mh_rewrite_message() are not as serious, but they should still be of type LOFF_T. I found both of these fixes in a patch file, bug-676388-largefile.patch, in the openSUSE mutt src rpm. It looks like Harald Koenig was the original author of a larger patch in that openSUSE ticket, which was reduced over time as fixes were made to Mutt. Note that patch file also incorrectly adjusted old_hdr_lines in mh.c. I've removed that part, as HEADER->lines is type int. Unfortunately, the BODY->hdr_offset type change will result in a header cache change (i.e. invalidation). I'm not enthused about doing that during a stable release, but the change is important enough to merit it.
Diffstat (limited to 'mutt.h')
-rw-r--r--mutt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mutt.h b/mutt.h
index 8f45e67f..b4f448f2 100644
--- a/mutt.h
+++ b/mutt.h
@@ -781,7 +781,7 @@ typedef struct body
PARAMETER *parameter; /* parameters of the content-type */
char *description; /* content-description */
char *form_name; /* Content-Disposition form-data name param */
- long hdr_offset; /* offset in stream where the headers begin.
+ LOFF_T hdr_offset; /* offset in stream where the headers begin.
* this info is used when invoking metamail,
* where we need to send the headers of the
* attachment