[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] mhfixmsg on a pathological mail
From: |
Ralph Corderoy |
Subject: |
Re: [Nmh-workers] mhfixmsg on a pathological mail |
Date: |
Tue, 29 Aug 2017 23:45:35 +0100 |
Hi Ken,
> > Also, it SEGVs without the `/plain'. Probably because
> > get_ctinfo()'s
> >
> > 685 if (*cp != '/') {
> > 686 if (!magic)
> > 687 ci->ci_subtype = mh_xstrdup("");
> > 688 goto magic_skip;
> > 689 }
>
> You know ... I am looking at this now, and I cannot understand the
> logic here.
I didn't punt on it without good reason. :-)
It's MIME too, so it's not as if the authors had a 70s'-induced drug
haze as a crutch.
It seems it's trying to allow subtype to be optional when *not* parsing
a user's composition, i.e. when it's a Content-Type header. After all,
mhbuild(1)'s grammar makes subtype mandatory for `#text/plain ...'. But
when there's no `/' we skip setting ci_subtype non-NULL.
707 if (!*ci->ci_subtype) {
missing_subtype:
708 inform("invalid %s: field in message %s (empty subtype for
\"%s\")",
709 TYPE_FIELD, ct->c_file, ci->ci_type);
710 return NOTOK;
711 }
Perhaps 686 should be `if (magic) goto missing_subtype? :-)
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
- Re: [Nmh-workers] mhfixmsg on a pathological mail, (continued)
- Re: [Nmh-workers] mhfixmsg on a pathological mail, Ken Hornstein, 2017/08/27
- Re: [Nmh-workers] mhfixmsg on a pathological mail, David Levine, 2017/08/28
- Re: [Nmh-workers] mhfixmsg on a pathological mail, Ken Hornstein, 2017/08/28
- Re: [Nmh-workers] mhfixmsg on a pathological mail, David Levine, 2017/08/28
- Re: [Nmh-workers] mhfixmsg on a pathological mail, Ken Hornstein, 2017/08/28
- Re: [Nmh-workers] mhfixmsg on a pathological mail, Ralph Corderoy, 2017/08/28
- Re: [Nmh-workers] mhfixmsg on a pathological mail, Ralph Corderoy, 2017/08/29
- Re: [Nmh-workers] mhfixmsg on a pathological mail, Ken Hornstein, 2017/08/29
- Re: [Nmh-workers] mhfixmsg on a pathological mail, Ken Hornstein, 2017/08/29
- Re: [Nmh-workers] mhfixmsg on a pathological mail, valdis . kletnieks, 2017/08/29
- Re: [Nmh-workers] mhfixmsg on a pathological mail,
Ralph Corderoy <=
- Re: [Nmh-workers] mhfixmsg on a pathological mail, Ken Hornstein, 2017/08/30
- Re: [Nmh-workers] mhfixmsg on a pathological mail, Ralph Corderoy, 2017/08/30
- Re: [Nmh-workers] mhfixmsg on a pathological mail, Ken Hornstein, 2017/08/30
- Re: [Nmh-workers] mhfixmsg on a pathological mail, Ralph Corderoy, 2017/08/19
Re: [Nmh-workers] mhfixmsg on a pathological mail, David Levine, 2017/08/18