nmh-workers
[Top][All Lists]
Advanced

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

Re: (Not-so) hypothetical question: What to do about NULs?


From: Ken Hornstein
Subject: Re: (Not-so) hypothetical question: What to do about NULs?
Date: Sat, 18 Feb 2023 20:21:20 -0500

>Seems to me this is classifcation of attachment data, which will end up
>as octet-stream in that case.

It's ... a little confusing!

>For S-nail we more or less do what Heirloom mailx has done.

Well, it seems that in the message lexer if you encounter a NUL you
just stop, from a_msg_scan():

      cp = mslp->msl_cap->ca_arg.ca_str.s;
      if((c = *cp++) != '\0')
         break;

It does look like to me that for IMAP and POP a NUL character is handled
properly.  But that doesn't answer the question, what do you THINK should
happen?  Should NULs be passed through?  You basically can't use C strings
anywhere if you want to handle embedded NULs.

>The implementation is total crap. (longjmp codebase, data leaks,
>blocking I/O, all that (it was).)  All of these (mailbox read,
>content-transfer decoding, character set conversion, .. display
>preparation) should be "filters" with input and output plugged together,
>with internal buffers as necessary.  That is the v15 MIME and I/O layer
>rewrite that is not happening for nine years.

Sigh, I know the feeling :-/

--Ken



reply via email to

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