diff --git a/mailnews/mime/src/mimeenc.cpp b/mailnews/mime/src/mimeenc.cpp index 1aa93d47d84b..4f227c11bca5 100644 --- a/mailnews/mime/src/mimeenc.cpp +++ b/mailnews/mime/src/mimeenc.cpp @@ -175,8 +175,8 @@ mime_decode_qp_buffer (MimeDecoderData *data, const char *buffer, PRInt32 length if (in > out) *out++ = token[2]; continue; } - - *out++ = (char) c; + /* treat null bytes as spaces per bug 243199 comment 7 */ + *out++ = c ? (char) c : ' '; } else {