Chad Perrin: SOB

14 January 2010

Email Composed in Notepad?

Filed under: Geek,inanity — apotheon @ 11:37

I got an email on the bugtraq list that has some weird formatting quirk infesting it. The bugtraq archive won’t show the problem for us, but I’ll copy and paste it directly from Mutt for you here:

Release Date:^M
Product: ^M
Tested Vulnerable Versions: ^M
3.1.1 and 3.1.0^M
Null Pointer^M
Hellcode Research discovered a null pointer vulnerability in Openoffice for Windows.^M
Opening a malformed ".csv" file with Openoffice, causes a crash on "soffice.bin"^M
Hellcode Research^M
The Computer Cheats (TCC)^M
Natal Networks^M

I wonder how things like this happen. It looks like someone might have composed an email in Notepad then used some Unix tool to send it to a mail user agent of some sort. This is something I have seen before, a couple of times. Is there some email client that does this crap?

If you have an explanation that escapes me at the moment, I’d love to hear it. If they’re composing emails for the bugtraq list in Notepad, though, I’m pretty sure I wouldn’t ever want to work for them.


  1. That is^M pretty pathetic.^M ^M

    Seriously though. Do they really not know what their email looks like when it goes out? Perhaps you should email the person who posted this to bugtraq the link to this. Perhaps adding in a few choice eol characters.^M


    Comment by Joseph A Nagy Jr — 14 January 2010 @ 07:15

  2. I think that’s from Microsoft Word. It’s been such a long time since I used Microsoft Word (like since the windows 98 days) that I can’t remember whether it was ^M or some ^(some other character), but it did that same annoying crap when you tried to paste something into it that was double-spaced from some other program.

    Haven’t seen it in ages in any case.

    Comment by Mina — 17 January 2010 @ 01:33

  3. Check the mail headers. As I was trying to set up Outlook for testing purposes, one of the options was to use Word to compose emails (I had to do a double take).

    Comment by Joseph A Nagy Jr — 17 January 2010 @ 07:18

  4. It’s not just Notepad or Word or Outlook. Microsoft applications deposit ugly ^M characters at linebreaks when the file is imported into certain other contexts, and vice-versa. I’ve used Vim to open text files created on MS Windows machines and seen that damnable line termination character littering the files. Because it’s a representation of a special character rather than a literal carat and M, it can’t be deleted using a regular expression with characters whose keys appear on the keyboard, either; one has to either copy+paste the character into the regex or use some kind of special character utility to produce the character. In some cases, \r will match that ^M control character. It depends on the regex engine you’re using.

    It’s annoying.

    Luckily, there are tools designed specifically to eliminate that stuff (such as dos2unix, which is part of the unix2dos port on FreeBSD), and it’s reasonably easy to write your own such tool in something like Perl or Ruby if need be.

    Comment by apotheon — 17 January 2010 @ 11:39

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

All original content Copyright Chad Perrin: Distributed under the terms of the Open Works License