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
Родитель c29f9417fb
Коммит 31cab177b0
1 изменённых файлов: 8 добавлений и 6 удалений

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

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