Ticket #3046 (new defect)

Opened 7 months ago

Last modified 4 months ago

Bug mangling mbox files on 1.4.2.3

Reported by: cypherpunk Owned by: mutt-dev
Priority: major Milestone:
Component: mutt Version: 1.4
Keywords: Cc:

Description

I just tickled a bug in mutt 1.4.2.3, but unfortunately I'm not entirely sure how. It involved copying a message to, then linking a thread (using the edit-threads patch) in an mbox file under a softlink which has a folder hook attached to it, then saving and leaving mutt.

The end result is that a number of messages get mangled in the following two ways:

* The 12th character (starting from 1) of the line starting with "From " got replaced with a newline, like (using a diff-like format):

-From email@address.tld Mon Apr 14 23:20:10 2008
+From email@
+ddress.tld Mon Apr 14 23:20:10 2008

The place where it happens appears to be exactly at the 12th character and is not dependent on the actual content of the line.

* The start of the body got mangled, like this:

-
---fXStkuK2IQBfcDe+
+QBfcDe+
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

Or

-This is a multi-part message in MIME format.
+lti-part message in MIME format.

Most by far messages in that mbox contain attachments and I haven't spotted mangling of other messages (yet), but I cannot vouch for that not having happened, as this information was gathered after mbox reconstruction; the unmangled version was no longer available.

The hook and the macro provided for completeness, I don't know if they have anything to do with it:

macro index @@m_markings "<tag-pattern>~F^M<tag-prefix><clear-flag>!<tag-prefix><clear-flag>*<collapse-all><tag-pattern>~d<2w!~v^M<tag-prefix><flag-message><tag-prefix><clear-flag>*"

folder-hook =mangledmbox push @@m_markings

And my version of mutt:

Mutt 1.4.2.3i (2007-05-26)
Copyright (C) 1996-2002 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: FreeBSD 6.2-RELEASE-p5 (i386) [using ncurses 5.2]
Compile options:
-DOMAIN
-DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  
-USE_FCNTL  +USE_FLOCK
+USE_POP  +USE_IMAP  +IMAP_EDIT_THREADS  +USE_GSS  +USE_SSL  -USE_SASL  
+HAVE_REGCOMP  -USE_GNU_REGEX  +COMPRESSED  
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET  
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM  
+HAVE_PGP  -BUFFY_SIZE -EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET  +HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_GETSID  +HAVE_GETADDRINFO  
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/local/share/mutt"
SYSCONFDIR="/usr/local/etc"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <mutt-dev@mutt.org>.
To report a bug, please use the flea(1) utility.

patch-1.4.2.dw.pgp-menu-traditional.2-fix
1.3.28.nr.threadcomplete
1.4.2.3-jpd.pgp-shorten-more
patch-1.4.0.cd.edit_threads.9.5
pgp_shorten-1.3.27-sec-1
patch-1.3.23.bj.current_shortcut.1
vvv.initials
rr.compressed

I can provide the precise patches as applied to stock 1.4.2.3 source, of course.

Change History

Changed 4 months ago by brendan

can you reproduce with 1.5.18, unpatched? it has at least the edit_threads and current_shortcut patches built in.

Note: See TracTickets for help on using tickets.