GNU bug report logs - #7746
SERIOUS BUG: mail-strip-quoted-names bug causing unrmail to lose mail

Previous Next

Package: emacs;

Reported by: mark.lillibridge <at> hp.com

Date: Tue, 28 Dec 2010 00:11:02 UTC

Severity: normal

Fixed in version 23.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: mark.lillibridge <at> hp.com
Subject: bug#7746: closed (Re: bug#7746: SERIOUS BUG: mail-strip-quoted-names
 bug causing unrmail to lose mail)
Date: Sun, 02 Jan 2011 02:37:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#7746: SERIOUS BUG: mail-strip-quoted-names bug causing unrmail to lose mail

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 7746 <at> debbugs.gnu.org.

-- 
7746: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7746
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 7746-done <at> debbugs.gnu.org
Subject: Re: bug#7746: SERIOUS BUG: mail-strip-quoted-names bug causing
	unrmail to lose mail
Date: Sat, 01 Jan 2011 21:43:59 -0500
Version: 23.3

Thanks; applied.

[Message part 3 (message/rfc822, inline)]
From: Mark Lillibridge <mark.lillibridge <at> hp.com>
To: bug-gnu-emacs <at> gnu.org
Subject: SERIOUS BUG: mail-strip-quoted-names bug causing unrmail to lose mail
Date: Mon, 27 Dec 2010 16:17:20 -0800
mail-strip-quoted-names in mail/mail-utils.el (at least version 23.1
onwards) contains the following code:

mail-utils.el:187:
	   (with-current-buffer (get-buffer-create " *temp*")
	     (erase-buffer)
	     ...
	     (erase-buffer))

This code erases the buffer " *temp*" even if it is being used by
another piece of code!  This is particularly bad because this is the
first buffer used by with-temp-buffer.

A simple fix is to switch to using with-temp-buffer, which always
creates and destroys a new buffer (patch at end):

	   (with-temp-buffer
	      ...
	      )


    This bug breaks unrmail badly, causing it to discard all messages
after one containing a from line that causes that block of code to be
executed (roughly, from lines that contain nested comments).  This is
because unrmail loads the file to be converted into a buffer created
with with-temp-buffer, which is in turn erased prematurely by
mail-strip-quoted-names.  [There is a longer discussion about this on
the developers mailing list.]

    As this bug causes the permanent loss of e-mail, it should probably
be fixed posthaste, including in version 23.

- Mark

ts-rhel5 [158]% diff mail-utils.el new-mail-utils.el
187,188c187
<          (with-current-buffer (get-buffer-create " *temp*")
<            (erase-buffer)
---
>          (with-temp-buffer
201,202c200
<            (setq address (buffer-string))
<            (erase-buffer))
---
>            (setq address (buffer-string)))



This bug report was last modified 14 years and 145 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.