nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] corruption when attaching all-null files

2014-05-07 11:51:13
it gets assigned a type of application/octet-stream, but no encoding
gets done. after using Attach:, and then running mime on the draft, it
looks like this: (copy/pasted from my edit buffer, where the nulls show
up as '^@')

The automatic selection code for application types is:

    case CT_APPLICATION:
       /* For application type, use base64, except when postscript */
       if (contains8bit || linelen || linespace || checksw)
           ct->c_encoding = (ct->c_subtype == APPLICATION_POSTSCRIPT)
               ? CE_QUOTED : CE_BASE64;
       else
           ct->c_encoding = CE_7BIT.

A file of all \0 wouldn't match any of these cases (contains8bit only
gets set if the function fails isascii(), which is between 0 and 127.).
I think we need a new test (isvalid7bit?  Have to think about it).

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>