<<< Date Index >>>     <<< Thread Index >>>

Re: Mutt segfaults when trying to verify some PGP signatures



Hello Adeodato,

On Mon, Aug 23, 2004 at 06:03:44PM +0200, Adeodato Simó wrote:
> hi Niklas,
> 
> * Niklas Morberg [Mon, 23 Aug 2004 09:01:02 +0200]:
> > When trying to read some messages on this list I get:
> > PGP signature could NOT be verified.Segmentation fault
> > and I'm back at the prompt. Nasty.
> 
>   Indeed. Let's see: can you reproduce if you pass a -F /dev/null option
>   to mutt?

I couldn't read IMAP without a muttrc, so I created a minimal version
and that worked without crashing. I gradually added my muttrc until I
could reproduce the problem and found this offending line in my muttrc:

color body magenta black [-a-z_0-9.]+@[-a-z_0-9.]+ 

Working with that line, I could trim it down to:

color body magenta black [a-c]

and still get mutt to crash. A regexp without a range (i.e. without the
'-' character) works fine.

> and also: what is your locale?

LANG=en_US.UTF-8
LC_CTYPE=en_US.ISO-8859-15
LC_NUMERIC="en_US.UTF-8"
LC_TIME=sv_SE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES=C
LC_PAPER=sv_SE.UTF-8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

> > Since mutt dies I can't quote the messages that are problematic, but
> > here are the subject lines and authors of two messages that kills my
> > mutt:
> 
> > "Re: Why isn't it part of mutt "proper"" Jacob S.
> > "Re: LC_CTYPE or not?"                   Thorsten Haude
> 
>   can't reproduce with your very same mutt version.

Now that I can read the messages I see what might be different from
other signed messages: they are signed on a weekday that contains either
å, ä or ö. The gpg output in the PGP header shown in mutt is:

gpg: Signature made lör 21 aug 2004 08.52.06 CEST

(It should say "...lör 21 aug...", but that doesn't really matter.)

Ok, now we're on to something. If the PGP output contains quoted
characters, then mutt chokes iff I have the line mentioned above in my
muttrc. 

If I put the line back in, mutt will die. If I 'export
LC_TIME=en_US.UTF-8' (to make sure gpg does not return UTF-8 chars),
then mutt will live; even with the problematic line from muttrc.

> >                                            Has anybody else been bitten
> > by the bug? Is there a workaround?
> 
>   yes and see below.

Thanks for the detailed information, I'll keep that around for the next
time. To sum up what I've found so far:

The latest debian build of mutt crashes if the PGP output contains
quoted characters _and_ muttrc uses a regexp with a range to color the
body.

Are these findings of any help to the debian maintainers? If so, whom
should I forward this information to?

Niklas