[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Segfault in post from mime quoted names in aliases

From: Ken Hornstein
Subject: Re: [Nmh-workers] Segfault in post from mime quoted names in aliases
Date: Wed, 12 Apr 2017 16:00:34 -0400

>I just added a second mime-encoded entry to my aliases file and then `post`
>seg-faulted. Only one entry seems to be ok.
>This alias file is enough to cause this:
>n1: =?iso-8859-1?Q?gnillen?= <address@hidden>
>n2: =?iso-8859-1?Q?gnillen?= <address@hidden>
>With only n1 it works, with both of them it segfaults (even on current HEAD).
>It does not seem to matter what I enter in the 'To' field.

Oh, ha-ha!  How ... unexpected.  Looks like this bug has been around for
approximately forever!  I think any two group-base aliases would have
triggered it.

Here's the line that triggers the bug.  For this code, "gr" is the value
returned from getgrnam() or getgrgid().  See the problem?

    while ((gp = *gr->gr_mem++))

If you don't get it, here's a hint: getgrnam() and getgrgid() are not

Fixing this should be relatively easy.  But ... is this code useful,
now?  With the encoding schemes that exist today, you might want to put
an = sign in an email address, and really, how often are you sending
email to a Unix group?  BTW, in testing this I accidentally sent an
email to the work "root" mailing list because of Ralph's noted use of
atoi() meant that anything weird ends up calling getgrgid(0); luckily
those people have a sense of humor.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]