fix crash generating mdn receipt when original message has no message-id sr=mscott 224738

This commit is contained in:
bienvenu%nventure.com 2004-03-08 17:31:18 +00:00
Родитель cdec33037e
Коммит 8703dade1c
1 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -598,12 +598,14 @@ nsresult nsMsgMdnGenerator::CreateFirstPart()
m_headers->ExtractHeader(HEADER_MESSAGE_ID, PR_FALSE,
getter_Copies(m_messageId));
if (*m_messageId.get() == '<')
tmpBuffer = PR_smprintf("References: %s" CRLF, m_messageId.get());
else
tmpBuffer = PR_smprintf("References: <%s>" CRLF, m_messageId.get());
PUSH_N_FREE_STRING(tmpBuffer);
if (!m_messageId.IsEmpty())
{
if (*m_messageId.get() == '<')
tmpBuffer = PR_smprintf("References: %s" CRLF, m_messageId.get());
else
tmpBuffer = PR_smprintf("References: <%s>" CRLF, m_messageId.get());
PUSH_N_FREE_STRING(tmpBuffer);
}
tmpBuffer = PR_smprintf("%s" CRLF, "MIME-Version: 1.0");
PUSH_N_FREE_STRING(tmpBuffer);