зеркало из https://github.com/mozilla/pjs.git
fix for #59421. sr=bienvenu. prevent the crash when saving a news message with a unicode file name.
the save still fails, but at least you don't crash.
This commit is contained in:
Родитель
8354ca813d
Коммит
ec87b9fa4a
|
@ -2162,7 +2162,11 @@ PRInt32 nsNNTPProtocol::BeginArticle()
|
|||
nsCOMPtr <nsISupports> supports;
|
||||
NS_NewIOFileStream(getter_AddRefs(supports), fileSpec,
|
||||
PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, 00700);
|
||||
m_tempArticleStream = do_QueryInterface(supports);
|
||||
nsresult rv;
|
||||
m_tempArticleStream = do_QueryInterface(supports, &rv);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv) && m_tempArticleStream,"failed to get article stream");
|
||||
if (NS_FAILED(rv) || !m_tempArticleStream) return -1;
|
||||
|
||||
PRBool needDummyHeaders = PR_FALSE;
|
||||
msgurl->GetAddDummyEnvelope(&needDummyHeaders);
|
||||
if (needDummyHeaders)
|
||||
|
|
Загрузка…
Ссылка в новой задаче