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
_______________________________________________
Nmh-workers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/nmh-workers