bug#1692: marked as done (mutt: corrupt maildir produces segfault)
Your message dated Sun, 9 Nov 2003 22:46:19 +0100
with message-id <20031109214619.GK1430@xxxxxxxxxxxxxxxxxxxxxxxxxx>
and subject line bug#1692: mutt: corrupt maildir produces segfault
has caused the attached bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Herr der Kaefer
(administrator, GUUG bugs database)
--------------------------------------
Received: (at submit) by bugs.guug.de; 8 Nov 2003 13:01:48 +0000
>From thomasb@xxxxxxxxx Sat Nov 08 14:01:46 2003
Received: from undomiel.dawnlink.net ([213.144.140.234]
ident=O/+iSCKbB9O1zHfUTiE9OJgmWuiNzvXh)
by trithemius.gnupg.org with esmtp (Exim 3.35 #1 (Debian))
id 1AISio-0006Ml-00
for <submit@xxxxxxxxxxxx>; Sat, 08 Nov 2003 14:01:46 +0100
Received: (qmail 29127 invoked by uid 2000); 8 Nov 2003 13:04:16 -0000
Date: Sat, 8 Nov 2003 14:04:16 +0100
From: Thomas Bader <thomasb@xxxxxxxxx>
To: submit@xxxxxxxxxxxx
Subject: mutt: corrupt maildir produces segfault
Message-ID: <20031108130416.GA29025@xxxxxxxxxxxxxxxxxxxxx>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Organization: [intentionally left blank]
User-Agent: Mutt/1.5.4i
X-Spam-Status: No, hits=-5.4 required=5.0
tests=BAYES_20,USER_AGENT_MUTT
autolearn=ham version=2.55
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
Package: mutt
Version: mutt-1.5.5
Severity: normal
Because of a crash my ~/Maildir/ went corrupted. I had the
same message in new/ and in cur/:
new/1066234047.2834.undomiel.dawnlink.net
cur/1066234047.2834.undomiel.dawnlink.net:2,S
In that case, mutt segfaults whenever it tries to check for
newly arrived messages.
According to gdb it crashes in mh.c:1528:
if (mutt_strcmp (ctx->hdrs[i]->path, p->h->path))
gdb tells me that p->h->path is not accessible.
When I delete the duplicate file everything works fine.
I would suggest, that in case of duplicate file names mutt
either tells the user about it or mutt tries to fix it
itself.
---------------------------------------
Received: (at 1692-done) by bugs.guug.de; 9 Nov 2003 21:43:56 +0000
>From roessler+bounce@xxxxxxxxxxxxxxxxxx Sun Nov 09 22:43:53 2003
Received: from does-not-exist.info ([217.160.221.198]
helo=kamino.does-not-exist.org)
by trithemius.gnupg.org with esmtp (Exim 3.35 #1 (Debian))
id 1AIxLd-0005jV-00
for <1692-done@xxxxxxxxxxxx>; Sun, 09 Nov 2003 22:43:53 +0100
Received: from voyager.does-not-exist.org (p3E9B9D95.dip0.t-ipconnect.de
[62.155.157.149])
(using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits))
(No client certificate requested)
by kamino.does-not-exist.org (Postfix) with ESMTP
id 133083140D5; Sun, 9 Nov 2003 22:46:24 +0100 (CET)
Received: by voyager.does-not-exist.org (Postfix, from userid 500)
id 500E48122; Sun, 9 Nov 2003 22:46:20 +0100 (CET)
Date: Sun, 9 Nov 2003 22:46:19 +0100
From: Thomas Roessler <roessler@xxxxxxxxxxxxxxxxxx>
To: Thomas Bader <thomasb@xxxxxxxxx>, 1692-done@xxxxxxxxxxxx
Subject: Re: bug#1692: mutt: corrupt maildir produces segfault
Message-ID: <20031109214619.GK1430@xxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20031108130416.GA29025@xxxxxxxxxxxxxxxxxxxxx>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20031108130416.GA29025@xxxxxxxxxxxxxxxxxxxxx>
User-Agent: Mutt/1.5.5i
X-Spam-Status: No, hits=-108.9 required=5.0
tests=AWL,BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,
PATCH_UNIFIED_DIFF,QUOTED_EMAIL_TEXT,REFERENCES,
REPLY_WITH_QUOTES,USER_AGENT_MUTT,USER_IN_WHITELIST
autolearn=ham version=2.55
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
This patch should fix the problem:
diff -u -r3.17 -r3.18
--- mh.c 19 Sep 2003 13:03:25 -0000 3.17
+++ mh.c 9 Nov 2003 21:41:28 -0000 3.18
@@ -1517,7 +1517,7 @@
ctx->hdrs[i]->active = 0;
maildir_canon_filename (buf, ctx->hdrs[i]->path, sizeof (buf));
p = hash_find (fnames, buf);
- if (p)
+ if (p && p->h)
{
/* message already exists, merge flags */
ctx->hdrs[i]->active = 1;
--
Thomas Roessler <roessler@xxxxxxxxxxxxxxxxxx>
On 2003-11-08 14:04:16 +0100, Thomas Bader wrote:
> From: Thomas Bader <thomasb@xxxxxxxxx>
> To: submit@xxxxxxxxxxxx
> Date: Sat, 8 Nov 2003 14:04:16 +0100
> Subject: bug#1692: mutt: corrupt maildir produces segfault
> Reply-To: Thomas Bader <thomasb@xxxxxxxxx>, 1692@xxxxxxxxxxxx
> Organization: [intentionally left blank]
> X-Spam-Level:
>
> Package: mutt
> Version: mutt-1.5.5
> Severity: normal
>
> Because of a crash my ~/Maildir/ went corrupted. I had the
> same message in new/ and in cur/:
>
> new/1066234047.2834.undomiel.dawnlink.net
> cur/1066234047.2834.undomiel.dawnlink.net:2,S
>
> In that case, mutt segfaults whenever it tries to check for
> newly arrived messages.
>
> According to gdb it crashes in mh.c:1528:
>
> if (mutt_strcmp (ctx->hdrs[i]->path, p->h->path))
>
> gdb tells me that p->h->path is not accessible.
>
> When I delete the duplicate file everything works fine.
>
> I would suggest, that in case of duplicate file names mutt
> either tells the user about it or mutt tries to fix it
> itself.
>